High level syntax control of loop filter

ABSTRACT

Methods and apparatuses for video encoding, comprising: receiving a video sequence; encoding the video sequence by using control flags for luma mapping with chroma scaling (LMCS) at a sequence level, a picture level, or a slice level, wherein the sequence level, the picture level, and the slice level are levels ranking from high to low; signaling a first control flag indicating whether the LMCS is enabled at a first level; and in response to the first control flag indicating the LMCS is enabled at the first level, signaling a second control flag indicating whether LMCS is enabled at a second level, wherein: the LMCS is enabled at the second level when a value of the second control flag equals to 1; the LMCS is disabled at the second level when the value of the second control flag equals to 0; and the second level is a lower level than the first level.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a divisional application of U.S. Application No.17/216,095, filed on Mar. 29, 2021, which claims priority to U.S.Provisional Pat. Application No. 63/001,448, filed on Mar. 29, 2020.Both of which are incorporated herein by reference in their entireties.

TECHNICAL FIELD

The present disclosure generally relates to video data processing, andmore particularly, to high level syntax control of loop filter.

BACKGROUND

A video is a set of static pictures (or “frames”) capturing the visualinformation. To reduce the storage memory and the transmissionbandwidth, a video can be compressed before storage or transmission anddecompressed before display. The compression process is usually referredto as encoding and the decompression process is usually referred to asdecoding. There are various video coding formats which use standardizedvideo coding technologies, most commonly based on prediction, transform,quantization, entropy coding and in-loop filtering. The video codingstandards, such as the High Efficiency Video Coding (e.g., HEVC/H.265)standard, the Versatile Video Coding (e.g., VVC/H.266) standard, and AVSstandards, specifying the specific video coding formats, are developedby standardization organizations. With more and more advanced videocoding technologies being adopted in the video standards, the codingefficiency of the new video coding standards get higher and higher.

SUMMARY OF THE DISCLOSURE

The embodiments of the present disclosure provide a video encodingmethod, comprising: receiving a video sequence; encoding the videosequence by using control flags for luma mapping with chroma scaling(LMCS) at a sequence level, a picture level, or a slice level, whereinthe sequence level, the picture level, and the slice level are levelsranking from high to low; signaling a first control flag indicatingwhether the LMCS is enabled at a first level; and in response to thefirst control flag indicating the LMCS is enabled at the first level,signaling a second control flag indicating whether LMCS is enabled at asecond level, wherein: the LMCS is enabled at the second level when avalue of the second control flag equals to 1; the LMCS is disabled atthe second level when the value of the second control flag equals to 0;and the second level is a lower level than the first level.

The embodiments of the present disclosure provide a video encodingmethod, comprising: receiving a video sequence; encoding the videosequence by using control flags for adaptive loop filter (ALF) at asequence level, a picture level, or a slice level, wherein the sequencelevel, the picture level, and the slice level are levels ranking fromhigh to low; signaling a first control flag indicating whether the ALFis enabled at a first level; and in response to the first control flagindicating the ALF at the first level is enabled, signaling a secondcontrol flag indicating whether ALF is enabled at a second level,wherein: the ALF is enabled at the second level when a value of thesecond control flag equals to 1; the ALF is disabled at the second levelwhen the value of the second control flag equals to 0; and the secondlevel is a lower level than the first level.

The embodiments of the present disclosure provide a video encodingmethod, comprising: receiving a video sequence; encoding the videosequence by using control flags for sample adaptive offset (SAO) at asequence level, a picture level, or a slice level, wherein the sequencelevel, the picture level, and the slice level are levels ranking fromhigh to low; signaling a first control flag indicating whether the SAOis enabled at a first level; and in response to the first control flagindicating SAO is enabled at the first level, signaling a second controlflag indicating whether the SAO is enabled at a second level, wherein:the SAO is enabled for a luma component at the second level when a valueof the second control flag equals to 1; the SAO is disabled for a lumacomponent at a second level when the value of the second control flagequals to 0; and the second level is a lower level than the first level.

BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments and various aspects of the present disclosure areillustrated in the following detailed description and the accompanyingfigures. Various features shown in the figures are not drawn to scale.

FIG. 1 illustrates a schematic diagram illustrating structures of anexample video sequence, consistent with some embodiments of the presentdisclosure.

FIG. 2A illustrates a schematic diagram illustrating an exemplaryencoding process of a hybrid video coding system, consistent with someembodiments of the present disclosure.

FIG. 2B illustrates a schematic diagram illustrating another exemplaryencoding process of a hybrid video coding system, consistent with someembodiments of the present disclosure.

FIG. 3A illustrates a schematic diagram illustrating an exemplarydecoding process of a hybrid video coding system, consistent with someembodiments of the present disclosure.

FIG. 3B illustrates a schematic diagram illustrating another exemplarydecoding process of a hybrid video coding system, consistent with someembodiments of the present disclosure.

FIG. 4 illustrates a block diagram of an exemplary apparatus forencoding or decoding a video, consistent with some embodiments of thepresent disclosure.

FIG. 5 shows an example pseudocode including a control variable enablingluma mapping with chroma scaling at a sequence level.

FIG. 6 shows an example pseudocode including a control variable forenabling luma mapping with chroma scaling in a picture header.

FIG. 7 shows an example pseudocode including a control variable enablingfor enabling luma mapping with chroma scaling in a slice header.

FIG. 8A shows an example pseudocode including adaptive loop filtersyntax in a sequence parameter set.

FIG. 8B shows an example pseudocode including adaptive loop filtersyntax in a picture parameter set.

FIG. 9 shows an example pseudocode including adaptive loop filter syntaxin a picture header.

FIG. 10 shows an example pseudocode including adaptive loop filtersyntax in a slice header.

FIG. 11 shows an example pseudocode including sample adaptive offsetsyntax in a sequence parameter set.

FIG. 12 shows an example pseudocode including sample adaptive offsetsyntax in a picture parameter set.

FIG. 13 shows an example pseudocode including sample adaptive offsetsyntax in a picture header.

FIG. 14 shows an example pseudocode including sample adaptive offsetsyntax in a slice header.

FIG. 15 shows an example pseudocode including deblocking filter syntaxin a picture parameter set.

FIG. 16 shows an example pseudocode including deblocking filter syntaxin a picture header.

FIG. 17 shows an example pseudocode including deblocking filter syntaxin a slice header.

FIG. 18 shows example semantics for luma mapping with chroma scaling,adaptive loop filter, and sample adaptive offset, according to someembodiments of the present disclosure.

FIG. 19 shows an example pseudocode including a novel picture parameterset for adaptive loop filter, according to some embodiments of thepresent disclosure.

FIG. 20 shows an example pseudocode including a novel picture headersyntax for adaptive loop filter, according to some embodiments of thepresent disclosure.

FIG. 21 shows an example pseudocode including a novel slice headersyntax for adaptive loop filter, according to some embodiments of thepresent disclosure.

FIGS. 22A-C show an example semantics including novel flags for pictureheader syntax, slice header syntax, and picture parameter set of anadaptive loop filter, according to some embodiments of the presentdisclosure.

FIG. 23 shows an example pseudocode including a novel picture parameterset for sample adaptive offset, according to some embodiments of thepresent disclosure.

FIG. 24 shows an example pseudocode including a novel picture headersyntax for sample adaptive offset, according to some embodiments of thepresent disclosure.

FIG. 25 shows an example pseudocode including a novel slice headersyntax for sample adaptive offset, according to some embodiments of thepresent disclosure.

FIG. 26 shows an example semantics including novel flags for pictureheader syntax, slice header syntax, and picture parameter set of asample adaptive offset, according to some embodiments of the presentdisclosure.

FIG. 27 shows an example pseudocode including a novel sequence parameterset with a sequence parameter set disabled flag for deblocking filter,according to some embodiments of the present disclosure.

FIG. 28 shows an example pseudocode including a novel picture parameterset with a sequence parameter set disabled flag for deblocking filter,according to some embodiments of the present disclosure.

FIG. 29 shows an example pseudocode including a novel picture headersyntax with a sequence parameter set disabled flag for deblockingfilter, according to some embodiments of the present disclosure.

FIG. 30 shows an example pseudocode including a novel slice headersyntax with a sequence parameter set disabled flag for deblockingfilter, according to some embodiments of the present disclosure.

FIGS. 31A and 31B show an example semantics including novel flags forpicture header syntax, slice header syntax, sequence parameter set, andpicture parameter set of a deblocking filter, according to someembodiments of the present disclosure.

FIG. 32 is a flow chart depicting an exemplary process for determiningluma mapping with chroma scaling (LMCS) for a video frame, according tosome embodiments of the present disclosure.

FIG. 33 is a flow chart depicting an exemplary process for adaptive loopfilter (ALF) for a video frame, according to some embodiments of thepresent disclosure.

FIG. 34 is a flow chart depicting an exemplary process for determiningsample adaptive offset (SAO) for a video frame, according to someembodiments of the present disclosure.

FIG. 35 is a flow chart depicting an exemplary process for determiningadaptive loop filter (ALF) is disabled for a de-blocking filter for avideo frame, according to some embodiments of the present disclosure.

DETAILED DESCRIPTION

Reference will now be made in detail to exemplary embodiments, examplesof which are illustrated in the accompanying drawings. The followingdescription refers to the accompanying drawings in which the samenumbers in different drawings represent the same or similar elementsunless otherwise represented. The implementations set forth in thefollowing description of exemplary embodiments do not represent allimplementations consistent with the invention. Instead, they are merelyexamples of apparatuses and methods consistent with aspects related tothe invention as recited in the appended claims. Particular aspects ofthe present disclosure are described in greater detail below. The termsand definitions provided herein control, if in conflict with termsand/or definitions incorporated by reference.

The Joint Video Experts Team (JVET) of the ITU-T Video Coding ExpertGroup (ITU-T VCEG) and the ISO/IEC Moving Picture Expert Group (ISO/IECMPEG) is currently developing the Versatile Video Coding (VVC/H.266)standard. The VVC standard is aimed at doubling the compressionefficiency of its predecessor, the High Efficiency Video Coding(HEVC/H.265) standard. In other words, VVC’s goal is to achieve the samesubjective quality as HEVC/H.265 using half the bandwidth.

To achieve the same subjective quality as HEVC/H.265 using half thebandwidth, the JVET has been developing technologies beyond HEVC usingthe joint exploration model (JEM) reference software. As codingtechnologies were incorporated into the JEM, the JEM achievedsubstantially higher coding performance than HEVC.

The VVC standard has been developed recent, and continues to includemore coding technologies that provide better compression performance.VVC is based on the same hybrid video coding system that has been usedin modem video compression standards such as HEVC, H.264/AVC, MPEG2,H.263, etc.

A video is a set of static pictures (or “frames”) arranged in a temporalsequence to store visual information. A video capture device (e.g., acamera) can be used to capture and store those pictures in a temporalsequence, and a video playback device (e.g., a television, a computer, asmartphone, a tablet computer, a video player, or any end-user terminalwith a function of display) can be used to display such pictures in thetemporal sequence. Also, in some applications, a video capturing devicecan transmit the captured video to the video playback device (e.g., acomputer with a monitor) in real-time, such as for surveillance,conferencing, or live broadcasting.

For reducing the storage space and the transmission bandwidth needed bysuch applications, the video can be compressed before storage andtransmission and decompressed before the display. The compression anddecompression can be implemented by software executed by a processor(e.g., a processor of a generic computer) or specialized hardware. Themodule for compression is generally referred to as an “encoder,” and themodule for decompression is generally referred to as a “decoder.” Theencoder and decoder can be collectively referred to as a “codec.” Theencoder and decoder can be implemented as any of a variety of suitablehardware, software, or a combination thereof. For example, the hardwareimplementation of the encoder and decoder can include circuitry, such asone or more microprocessors, digital signal processors (DSPs),application-specific integrated circuits (ASICs), field-programmablegate arrays (FPGAs), discrete logic, or any combinations thereof. Thesoftware implementation of the encoder and decoder can include programcodes, computer-executable instructions, firmware, or any suitablecomputer-implemented algorithm or process fixed in a computer-readablemedium. Video compression and decompression can be implemented byvarious algorithms or standards, such as MPEG- 1, MPEG-2, MPEG-4, H.26xseries, or the like. In some applications, the codec can decompress thevideo from a first coding standard and re-compress the decompressedvideo using a second coding standard, in which case the codec can bereferred to as a “transcoder.”

The video encoding process can identify and keep useful information thatcan be used to reconstruct a picture and disregard unimportantinformation for the reconstruction. If the disregarded, unimportantinformation cannot be fully reconstructed, such an encoding process canbe referred to as “lossy.” Otherwise, it can be referred to as“lossless.” Most encoding processes are lossy, which is a tradeoff toreduce the needed storage space and the transmission bandwidth.

The useful information of a picture being encoded (referred to as a“current picture”) include changes with respect to a reference picture(e.g., a picture previously encoded and reconstructed). Such changes caninclude position changes, luminosity changes, or color changes of thepixels, among which the position changes are mostly concerned. Positionchanges of a group of pixels that represent an object can reflect themotion of the object between the reference picture and the currentpicture.

A picture coded without referencing another picture (i.e., it is its ownreference picture) is referred to as an “I-picture.” A picture codedusing a previous picture as a reference picture is referred to as a“P-picture.” A picture coded using both a previous picture and a futurepicture as reference pictures (i.e., the reference is “bi-directional”)is referred to as a “B-picture.”

The present disclosure is directed to methods and apparatuses forprocessing video content consistent with above-described video codingstandards.

FIG. 1 illustrates structures of an example video sequence 100,according to some embodiments of the present disclosure. Video sequence100 can be a live video or a video having been captured and archived.Video 100 can be a real-life video, a computer-generated video (e.g.,computer game video), or a combination thereof (e.g., a real-life videowith augmented-reality effects). Video sequence 100 can be inputted froma video capture device (e.g., a camera), a video archive (e.g., a videofile stored in a storage device) containing previously captured video,or a video feed interface (e.g., a video broadcast transceiver) toreceive video from a video content provider.

As shown in FIG. 1 , video sequence 100 can include a series of picturesarranged temporally along a timeline, including pictures 102, 104, 106,and 108. Pictures 102-106 are continuous, and there are more picturesbetween pictures 106 and 108. In FIG. 1 , picture 102 is an I-picture,the reference picture of which is picture 102 itself. Picture 104 is aP-picture, the reference picture of which is picture 102, as indicatedby the arrow. Picture 106 is a B-picture, the reference pictures ofwhich are pictures 104 and 108, as indicated by the arrows. In someembodiments, the reference picture of a picture (e.g., picture 104) canbe not immediately preceding or following the picture. For example, thereference picture of picture 104 can be a picture preceding picture 102.It should be noted that the reference pictures of pictures 102-106 areonly examples, and the present disclosure does not limit embodiments ofthe reference pictures as the examples shown in FIG. 1 .

Typically, video codecs do not encode or decode an entire picture at onetime due to the computing complexity of such tasks. Rather, they cansplit the picture into basic segments, and encode or decode the picturesegment by segment. Such basic segments are referred to as basicprocessing units (“BPUs”) in the present disclosure. For example,structure 110 in FIG. 1 shows an example structure of a picture of videosequence 100 (e.g., any of pictures 102-108). In structure 110, apicture is divided into 4×4 basic processing units, the boundaries ofwhich are shown as dash lines. In some embodiments, the basic processingunits can be referred to as “macroblocks” in some video coding standards(e.g., MPEG family, H.261, H.263, or H.264/AVC), or as “coding treeunits” (“CTUs”) in some other video coding standards (e.g., H.265/HEVCor H.266/VVC). The basic processing units can have variable sizes in apicture, such as 128×128, 64×64, 32×32, 16×16, 4×8, 16×32, or anyarbitrary shape and size of pixels. The sizes and shapes of the basicprocessing units can be selected for a picture based on the balance ofcoding efficiency and levels of details to be kept in the basicprocessing unit. A CTU is the largest block unit and can include as manyas 128×128 luma samples (plus the corresponding chroma samples dependingon the chroma format). A CTU may be further partitioned into codingunits (CUs) using quad-tree, binary tree, ternary tree, or a combinationthereof.

The basic processing units can be logical units, which can include agroup of different types of video data stored in a computer memory(e.g., in a video frame buffer). For example, a basic processing unit ofa color picture can include a luma component (Y) representing achromaticbrightness information, one or more chroma components (e.g., Cb and Cr)representing color information, and associated syntax elements, in whichthe luma and chroma components can have the same size of the basicprocessing unit. The luma and chroma components can be referred to as“coding tree blocks” (“CTBs”) in some video coding standards (e.g.,H.265/HEVC or H.266/VVC). Any operation performed to a basic processingunit can be repeatedly performed to each of its luma and chromacomponents.

Video coding has multiple stages of operations, examples of which areshown in FIGS. 2A-2B and FIGS. 3A-3B. For each stage, the size of thebasic processing units can still be too large for processing, and thuscan be further divided into segments referred to as “basic processingsub-units” in the present disclosure. In some embodiments, the basicprocessing sub-units can be referred to as “blocks” in some video codingstandards (e.g., MPEG family, H.261, H.263, or H.264/AVC), or as “codingunits” (“CUs”) in some other video coding standards (e.g., H.265/HEVC orH.266/VVC). A basic processing sub-unit can have the same or smallersize than the basic processing unit. Similar to the basic processingunits, basic processing sub-units are also logical units, which caninclude a group of different types of video data (e.g., Y, Cb, Cr, andassociated syntax elements) stored in a computer memory (e.g., in avideo frame buffer). Any operation performed to a basic processingsub-unit can be repeatedly performed to each of its luma and chromacomponents. It should be noted that such division can be performed tofurther levels depending on processing needs. It should also be notedthat different stages can divide the basic processing units usingdifferent schemes.

For example, at a mode decision stage (an example of which is shown inFIG. 2B), the encoder can decide what prediction mode (e.g.,intra-picture prediction or inter-picture prediction) to use for a basicprocessing unit, which can be too large to make such a decision. Theencoder can split the basic processing unit into multiple basicprocessing sub-units (e.g., CUs as in H.265/HEVC or H.266/VVC), anddecide a prediction type for each individual basic processing sub-unit.

For another example, at a prediction stage (an example of which is shownin FIGS. 2A-2B), the encoder can perform prediction operation at thelevel of basic processing sub-units (e.g., CUs). However, in some cases,a basic processing sub-unit can still be too large to process. Theencoder can further split the basic processing sub-unit into smallersegments (e.g., referred to as “prediction blocks” or “PBs” inH.265/HEVC or H.266/VVC), at the level of which the prediction operationcan be performed.

For another example, at a transform stage (an example of which is shownin FIGS. 2A-2B), the encoder can perform a transform operation forresidual basic processing sub-units (e.g., CUs). However, in some cases,a basic processing sub-unit can still be too large to process. Theencoder can further split the basic processing sub-unit into smallersegments (e.g., referred to as “transform blocks” or “TBs” in H.265/HEVCor H.266/VVC), at the level of which the transform operation can beperformed. It should be noted that the division schemes of the samebasic processing sub-unit can be different at the prediction stage andthe transform stage. For example, in H.265/HEVC or H.266/VVC, theprediction blocks and transform blocks of the same CU can have differentsizes and numbers.

In structure 110 of FIG. 1 , basic processing unit 112 is furtherdivided into 3×3 basic processing sub-units, the boundaries of which areshown as dotted lines. Different basic processing units of the samepicture can be divided into basic processing sub-units in differentschemes.

In some implementations, to provide the capability of parallelprocessing and error resilience to video encoding and decoding, apicture can be divided into regions for processing, such that, for aregion of the picture, the encoding or decoding process can depend on noinformation from any other region of the picture. In other words, eachregion of the picture can be processed independently. By doing so, thecodec can process different regions of a picture in parallel, thusincreasing the coding efficiency. Also, when data of a region iscorrupted in the processing or lost in network transmission, the codeccan correctly encode or decode other regions of the same picture withoutreliance on the corrupted or lost data, thus providing the capability oferror resilience. In some video coding standards, a picture can bedivided into different types of regions. For example, H.265/HEVC andH.266/VVC provide two types of regions: “slices” and “tiles.” It shouldalso be noted that different pictures of video sequence 100 can havedifferent partition schemes for dividing a picture into regions.

For example, in FIG. 1 , structure 110 is divided into three regions114, 116, and 118, the boundaries of which are shown as solid linesinside structure 110. Region 114 includes four basic processing units.Each of regions 116 and 118 includes six basic processing units. Itshould be noted that the basic processing units, basic processingsub-units, and regions of structure 110 in FIG. 1 are only examples, andthe present disclosure does not limit embodiments thereof.

FIG. 2A illustrates a schematic diagram of an example encoding process200A, consistent with embodiments of the disclosure. For example, theencoding process 200A can be performed by an encoder. As shown in FIG.2A, the encoder can encode video sequence 202 into video bitstream 228according to process 200A. Similar to video sequence 100 in FIG. 1 ,video sequence 202 can include a set of pictures (referred to as“original pictures”) arranged in a temporal order. Similar to structure110 in FIG. 1 , each original picture of video sequence 202 can bedivided by the encoder into basic processing units, basic processingsub-units, or regions for processing. In some embodiments, the encodercan perform process 200A at the level of basic processing units for eachoriginal picture of video sequence 202. For example, the encoder canperform process 200A in an iterative manner, in which the encoder canencode a basic processing unit in one iteration of process 200A. In someembodiments, the encoder can perform process 200A in parallel forregions (e.g., regions 114-118) of each original picture of videosequence 202.

In FIG. 2A, the encoder can feed a basic processing unit (referred to asan “original BPU”) of an original picture of video sequence 202 toprediction stage 204 to generate prediction data 206 and predicted BPU208. The encoder can subtract predicted BPU 208 from the original BPU togenerate residual BPU 210. The encoder can feed residual BPU 210 totransform stage 212 and quantization stage 214 to generate quantizedtransform coefficients 216. The encoder can feed prediction data 206 andquantized transform coefficients 216 to binary coding stage 226 togenerate video bitstream 228. Components 202, 204, 206, 208, 210, 212,214, 216, 226, and 228 can be referred to as a “forward path.” Duringprocess 200A, after quantization stage 214, the encoder can feedquantized transform coefficients 216 to inverse quantization stage 218and inverse transform stage 220 to generate reconstructed residual BPU222. The encoder can add reconstructed residual BPU 222 to predicted BPU208 to generate prediction reference 224, which is used in predictionstage 204 for the next iteration of process 200A. Components 218, 220,222, and 224 of process 200A can be referred to as a “reconstructionpath.” The reconstruction path can be used to ensure that both theencoder and the decoder use the same reference data for prediction.

The encoder can perform process 200A iteratively to encode each originalBPU of the original picture (in the forward path) and generate predictedreference 224 for encoding the next original BPU of the original picture(in the reconstruction path). After encoding all original BPUs of theoriginal picture, the encoder can proceed to encode the next picture invideo sequence 202.

Referring to process 200A, the encoder can receive video sequence 202generated by a video capturing device (e.g., a camera). The term“receive” used herein can refer to receiving, inputting, acquiring,retrieving, obtaining, reading, accessing, or any action in any mannerfor inputting data.

At prediction stage 204, at a current iteration, the encoder can receivean original BPU and prediction reference 224, and perform a predictionoperation to generate prediction data 206 and predicted BPU 208.Prediction reference 224 can be generated from the reconstruction pathof the previous iteration of process 200A. The purpose of predictionstage 204 is to reduce information redundancy by extracting predictiondata 206 that can be used to reconstruct the original BPU as predictedBPU 208 from prediction data 206 and prediction reference 224.

Ideally, predicted BPU 208 can be identical to the original BPU.However, due to non-ideal prediction and reconstruction operations,predicted BPU 208 is generally slightly different from the original BPU.For recording such differences, after generating predicted BPU 208, theencoder can subtract it from the original BPU to generate residual BPU210. For example, the encoder can subtract values (e.g., greyscalevalues or RGB values) of pixels of predicted BPU 208 from values ofcorresponding pixels of the original BPU. Each pixel of residual BPU 210can have a residual value as a result of such subtraction between thecorresponding pixels of the original BPU and predicted BPU 208. Comparedwith the original BPU, prediction data 206 and residual BPU 210 can havefewer bits, but they can be used to reconstruct the original BPU withoutsignificant quality deterioration. Thus, the original BPU is compressed.

To further compress residual BPU 210, at transform stage 212, theencoder can reduce spatial redundancy of residual BPU 210 by decomposingit into a set of two-dimensional “base patterns,” each base patternbeing associated with a “transform coefficient.” The base patterns canhave the same size (e.g., the size of residual BPU 210). Each basepattern can represent a variation frequency (e.g., frequency ofbrightness variation) component of residual BPU 210. None of the basepatterns can be reproduced from any combinations (e.g., linearcombinations) of any other base patterns. In other words, thedecomposition can decompose variations of residual BPU 210 into afrequency domain. Such a decomposition is analogous to a discreteFourier transform of a function, in which the base patterns areanalogous to the base functions (e.g., trigonometry functions) of thediscrete Fourier transform, and the transform coefficients are analogousto the coefficients associated with the base functions.

Different transform algorithms can use different base patterns. Varioustransform algorithms can be used at transform stage 212, such as, forexample, a discrete cosine transform, a discrete sine transform, or thelike. The transform at transform stage 212 is invertible. That is, theencoder can restore residual BPU 210 by an inverse operation of thetransform (referred to as an “inverse transform”). For example, torestore a pixel of residual BPU 210, the inverse transform can bemultiplying values of corresponding pixels of the base patterns byrespective associated coefficients and adding the products to produce aweighted sum. For a video coding standard, both the encoder and decodercan use the same transform algorithm (thus the same base patterns).Thus, the encoder may record only the transform coefficients, from whichthe decoder can reconstruct residual BPU 210 without receiving the basepatterns from the encoder. Compared with residual BPU 210, the transformcoefficients can have fewer bits, but they can be used to reconstructresidual BPU 210 without significant quality deterioration. Thus,residual BPU 210 is further compressed.

The encoder can further compress the transform coefficients atquantization stage 214. In the transform process, different basepatterns can represent different variation frequencies (e.g., brightnessvariation frequencies). Because human eyes are generally better atrecognizing low-frequency variation, the encoder can disregardinformation of high-frequency variation without causing significantquality deterioration in decoding. For example, at quantization stage214, the encoder can generate quantized transform coefficients 216 bydividing each transform coefficient by an integer value (referred to asa “quantization parameter”) and rounding the quotient to its nearestinteger. After such an operation, some transform coefficients of thehigh-frequency base patterns can be converted to zero, and the transformcoefficients of the low-frequency base patterns can be converted tosmaller integers. The encoder can disregard the zero-value quantizedtransform coefficients 216, by which the transform coefficients arefurther compressed. The quantization process is also invertible, inwhich quantized transform coefficients 216 can be reconstructed to thetransform coefficients in an inverse operation of the quantization(referred to as “inverse quantization”).

Because the encoder disregards the remainders of such divisions in therounding operation, quantization stage 214 can be lossy. Typically,quantization stage 214 can contribute the most information loss inprocess 200A. The larger the information loss is, the fewer bits thequantized transform coefficients 216 can need. For obtaining differentlevels of information loss, the encoder can use different values of thequantization parameter or any other parameter of the quantizationprocess.

At binary coding stage 226, the encoder can encode prediction data 206and quantized transform coefficients 216 using a binary codingtechnique, such as, for example, entropy coding, variable length coding,arithmetic coding, Huffman coding, context-adaptive binary arithmeticcoding, or any other lossless or lossy compression algorithm. In someembodiments, besides prediction data 206 and quantized transformcoefficients 216, the encoder can encode other information at binarycoding stage 226, such as, for example, a prediction mode used atprediction stage 204, parameters of the prediction operation, atransform type at transform stage 212, parameters of the quantizationprocess (e.g., quantization parameters), an encoder control parameter(e.g., a bitrate control parameter), or the like. The encoder can usethe output data of binary coding stage 226 to generate video bitstream228. In some embodiments, video bitstream 228 can be further packetizedfor network transmission.

Referring to the reconstruction path of process 200A, at inversequantization stage 218, the encoder can perform inverse quantization onquantized transform coefficients 216 to generate reconstructed transformcoefficients. At inverse transform stage 220, the encoder can generatereconstructed residual BPU 222 based on the reconstructed transformcoefficients. The encoder can add reconstructed residual BPU 222 topredicted BPU 208 to generate prediction reference 224 that is to beused in the next iteration of process 200A.

It should be noted that other variations of the process 200A can be usedto encode video sequence 202. In some embodiments, stages of process200A can be performed by the encoder in different orders. In someembodiments, one or more stages of process 200A can be combined into asingle stage. In some embodiments, a single stage of process 200A can bedivided into multiple stages. For example, transform stage 212 andquantization stage 214 can be combined into a single stage. In someembodiments, process 200A can include additional stages. In someembodiments, process 200A can omit one or more stages in FIG. 2A.

FIG. 2B illustrates a schematic diagram of another example encodingprocess 200B, consistent with embodiments of the disclosure. Process200B can be modified from process 200A. For example, process 200B can beused by an encoder conforming to a hybrid video coding standard (e.g.,H.26x series). Compared with process 200A, the forward path of process200B additionally includes mode decision stage 230 and dividesprediction stage 204 into spatial prediction stage 2042 and temporalprediction stage 2044. The reconstruction path of process 200Badditionally includes loop filter stage 232 and buffer 234.

Generally, prediction techniques can be categorized into two types:spatial prediction and temporal prediction. Spatial prediction (e.g., anintra-picture prediction or “intra prediction”) can use pixels from oneor more already coded neighboring BPUs in the same picture to predictthe current BPU. That is, prediction reference 224 in the spatialprediction can include the neighboring BPUs. The spatial prediction canreduce the inherent spatial redundancy of the picture. Temporalprediction (e.g., an inter-picture prediction or “inter prediction”) canuse regions from one or more already coded pictures to predict thecurrent BPU. That is, prediction reference 224 in the temporalprediction can include the coded pictures. The temporal prediction canreduce the inherent temporal redundancy of the pictures.

Referring to process 200B, in the forward path, the encoder performs theprediction operation at spatial prediction stage 2042 and temporalprediction stage 2044. For example, at spatial prediction stage 2042,the encoder can perform the intra prediction. For an original BPU of apicture being encoded, prediction reference 224 can include one or moreneighboring BPUs that have been encoded (in the forward path) andreconstructed (in the reconstructed path) in the same picture. Theencoder can generate predicted BPU 208 by extrapolating the neighboringBPUs. The extrapolation technique can include, for example, a linearextrapolation or interpolation, a polynomial extrapolation orinterpolation, or the like. In some embodiments, the encoder can performthe extrapolation at the pixel level, such as by extrapolating values ofcorresponding pixels for each pixel of predicted BPU 208. Theneighboring BPUs used for extrapolation can be located with respect tothe original BPU from various directions, such as in a verticaldirection (e.g., on top of the original BPU), a horizontal direction(e.g., to the left of the original BPU), a diagonal direction (e.g., tothe down-left, downright, up-left, or up-right of the original BPU), orany direction defined in the used video coding standard. For the intraprediction, prediction data 206 can include, for example, locations(e.g., coordinates) of the used neighboring BPUs, sizes of the usedneighboring BPUs, parameters of the extrapolation, a direction of theused neighboring BPUs with respect to the original BPU, or the like.

For another example, at temporal prediction stage 2044, the encoder canperform the inter prediction. For an original BPU of a current picture,prediction reference 224 can include one or more pictures (referred toas “reference pictures”) that have been encoded (in the forward path)and reconstructed (in the reconstructed path). In some embodiments, areference picture can be encoded and reconstructed BPU by BPU. Forexample, the encoder can add reconstructed residual BPU 222 to predictedBPU 208 to generate a reconstructed BPU. When all reconstructed BPUs ofthe same picture are generated, the encoder can generate a reconstructedpicture as a reference picture. The encoder can perform an operation of“motion estimation” to search for a matching region in a scope (referredto as a “search window”) of the reference picture. The location of thesearch window in the reference picture can be determined based on thelocation of the original BPU in the current picture. For example, thesearch window can be centered at a location having the same coordinatesin the reference picture as the original BPU in the current picture andcan be extended out for a predetermined distance. When the encoderidentifies (e.g., by using a pel-recursive algorithm, a block-matchingalgorithm, or the like) a region similar to the original BPU in thesearch window, the encoder can determine such a region as the matchingregion. The matching region can have different dimensions (e.g., beingsmaller than, equal to, larger than, or in a different shape) from theoriginal BPU. Because the reference picture and the current picture aretemporally separated in the timeline (e.g., as shown in FIG. 1 ), it canbe deemed that the matching region “moves” to the location of theoriginal BPU as time goes by. The encoder can record the direction anddistance of such a motion as a “motion vector.” When multiple referencepictures are used (e.g., as picture 106 in FIG. 1 ), the encoder cansearch for a matching region and determine its associated motion vectorfor each reference picture. In some embodiments, the encoder can assignweights to pixel values of the matching regions of respective matchingreference pictures.

The motion estimation can be used to identify various types of motions,such as, for example, translations, rotations, zooming, or the like. Forinter prediction, prediction data 206 can include, for example,locations (e.g., coordinates) of the matching region, the motion vectorsassociated with the matching region, the number of reference pictures,weights associated with the reference pictures, or the like.

For generating predicted BPU 208, the encoder can perform an operationof “motion compensation.” The motion compensation can be used toreconstruct predicted BPU 208 based on prediction data 206 (e.g., themotion vector) and prediction reference 224. For example, the encodercan move the matching region of the reference picture according to themotion vector, in which the encoder can predict the original BPU of thecurrent picture. When multiple reference pictures are used (e.g., aspicture 106 in FIG. 1 ), the encoder can move the matching regions ofthe reference pictures according to the respective motion vectors andaverage pixel values of the matching regions. In some embodiments, ifthe encoder has assigned weights to pixel values of the matching regionsof respective matching reference pictures, the encoder can add aweighted sum of the pixel values of the moved matching regions.

In some embodiments, the inter prediction can be unidirectional orbidirectional. Unidirectional inter predictions can use one or morereference pictures in the same temporal direction with respect to thecurrent picture. For example, picture 104 in FIG. 1 is a unidirectionalinter-predicted picture, in which the reference picture (e.g., picture102) precedes picture 104. Bidirectional inter predictions can use oneor more reference pictures at both temporal directions with respect tothe current picture. For example, picture 106 in FIG. 1 is abidirectional inter-predicted picture, in which the reference pictures(e.g., pictures 104 and 108) are at both temporal directions withrespect to picture 104.

Still referring to the forward path of process 200B, after spatialprediction 2042 and temporal prediction stage 2044, at mode decisionstage 230, the encoder can select a prediction mode (e.g., one of theintra prediction or the inter prediction) for the current iteration ofprocess 200B. For example, the encoder can perform a rate-distortionoptimization technique, in which the encoder can select a predictionmode to minimize a value of a cost function depending on a bit rate of acandidate prediction mode and distortion of the reconstructed referencepicture under the candidate prediction mode. Depending on the selectedprediction mode, the encoder can generate the corresponding predictedBPU 208 and predicted data 206.

In the reconstruction path of process 200B, if intra prediction mode hasbeen selected in the forward path, after generating prediction reference224 (e.g., the current BPU that has been encoded and reconstructed inthe current picture), the encoder can directly feed prediction reference224 to spatial prediction stage 2042 for later usage (e.g., forextrapolation of a next BPU of the current picture). If the interprediction mode has been selected in the forward path, after generatingprediction reference 224 (e.g., the current picture in which all BPUshave been encoded and reconstructed), the encoder can feed predictionreference 224 to loop filter stage 232, at which the encoder can apply aloop filter to prediction reference 224 to reduce or eliminatedistortion (e.g., blocking artifacts) introduced by the interprediction. The encoder can apply various loop filter techniques at loopfilter stage 232, such as, for example, deblocking, sample adaptiveoffsets, adaptive loop filters, or the like. The loop-filtered referencepicture can be stored in buffer 234 (or “decoded picture buffer”) forlater use (e.g., to be used as an inter-prediction reference picture fora future picture of video sequence 202). The encoder can store one ormore reference pictures in buffer 234 to be used at temporal predictionstage 2044. In some embodiments, the encoder can encode parameters ofthe loop filter (e.g., a loop filter strength) at binary coding stage226, along with quantized transform coefficients 216, prediction data206, and other information.

FIG. 3A illustrates a schematic diagram of an example decoding process300A, consistent with embodiments of the disclosure. Process 300A can bea decompression process corresponding to the compression process 200A inFIG. 2A. In some embodiments, process 300A can be similar to thereconstruction path of process 200A. A decoder can decode videobitstream 228 into video stream 304 according to process 300A. Videostream 304 can be very similar to video sequence 202. However, due tothe information loss in the compression and decompression process (e.g.,quantization stage 214 in FIGS. 2A-2B), generally, video stream 304 isnot identical to video sequence 202. Similar to processes 200A and 200Bin FIGS. 2A-2B, the decoder can perform process 300A at the level ofbasic processing units (BPUs) for each picture encoded in videobitstream 228. For example, the decoder can perform process 300A in aniterative manner, in which the decoder can decode a basic processingunit in one iteration of process 300A. In some embodiments, the decodercan perform process 300A in parallel for regions (e.g., regions 114-118)of each picture encoded in video bitstream 228.

In FIG. 3A, the decoder can feed a portion of video bitstream 228associated with a basic processing unit (referred to as an “encodedBPU”) of an encoded picture to binary decoding stage 302. At binarydecoding stage 302, the decoder can decode the portion into predictiondata 206 and quantized transform coefficients 216. The decoder can feedquantized transform coefficients 216 to inverse quantization stage 218and inverse transform stage 220 to generate reconstructed residual BPU222. The decoder can feed prediction data 206 to prediction stage 204 togenerate predicted BPU 208. The decoder can add reconstructed residualBPU 222 to predicted BPU 208 to generate predicted reference 224. Insome embodiments, predicted reference 224 can be stored in a buffer(e.g., a decoded picture buffer in a computer memory). The decoder canfeed predicted reference 224 to prediction stage 204 for performing aprediction operation in the next iteration of process 300A.

The decoder can perform process 300A iteratively to decode each encodedBPU of the encoded picture and generate predicted reference 224 forencoding the next encoded BPU of the encoded picture. After decoding allencoded BPUs of the encoded picture, the decoder can output the pictureto video stream 304 for display and proceed to decode the next encodedpicture in video bitstream 228.

At binary decoding stage 302, the decoder can perform an inverseoperation of the binary coding technique used by the encoder (e.g.,entropy coding, variable length coding, arithmetic coding, Huffmancoding, context-adaptive binary arithmetic coding, or any other losslesscompression algorithm). In some embodiments, besides prediction data 206and quantized transform coefficients 216, the decoder can decode otherinformation at binary decoding stage 302, such as, for example, aprediction mode, parameters of the prediction operation, a transformtype, parameters of the quantization process (e.g., quantizationparameters), an encoder control parameter (e.g., a bitrate controlparameter), or the like. In some embodiments, if video bitstream 228 istransmitted over a network in packets, the decoder can depacketize videobitstream 228 before feeding it to binary decoding stage 302.

FIG. 3B illustrates a schematic diagram of another example decodingprocess 300B, consistent with embodiments of the disclosure. Process300B can be modified from process 300A. For example, process 300B can beused by a decoder conforming to a hybrid video coding standard (e.g.,H.26x series). Compared with process 300A, process 300B additionallydivides prediction stage 204 into spatial prediction stage 2042 andtemporal prediction stage 2044, and additionally includes loop filterstage 232 and buffer 234.

In process 300B, for an encoded basic processing unit (referred to as a“current BPU”) of an encoded picture (referred to as a “currentpicture”) that is being decoded, prediction data 206 decoded from binarydecoding stage 302 by the decoder can include various types of data,depending on what prediction mode was used to encode the current BPU bythe encoder. For example, if intra prediction was used by the encoder toencode the current BPU, prediction data 206 can include a predictionmode indicator (e.g., a flag value) indicative of the intra prediction,parameters of the intra prediction operation, or the like. Theparameters of the intra prediction operation can include, for example,locations (e.g., coordinates) of one or more neighboring BPUs used as areference, sizes of the neighboring BPUs, parameters of extrapolation, adirection of the neighboring BPUs with respect to the original BPU, orthe like. For another example, if inter prediction was used by theencoder to encode the current BPU, prediction data 206 can include aprediction mode indicator (e.g., a flag value) indicative of the interprediction, parameters of the inter prediction operation, or the like.The parameters of the inter prediction operation can include, forexample, the number of reference pictures associated with the currentBPU, weights respectively associated with the reference pictures,locations (e.g., coordinates) of one or more matching regions in therespective reference pictures, one or more motion vectors respectivelyassociated with the matching regions, or the like.

Based on the prediction mode indicator, the decoder can decide whetherto perform a spatial prediction (e.g., the intra prediction) at spatialprediction stage 2042 or a temporal prediction (e.g., the interprediction) at temporal prediction stage 2044. The details of performingsuch spatial prediction or temporal prediction are described in FIG. 2Band will not be repeated hereinafter. After performing such spatialprediction or temporal prediction, the decoder can generate predictedBPU 208. The decoder can add predicted BPU 208 and reconstructedresidual BPU 222 to generate prediction reference 224, as described inFIG. 3A.

In process 300B, the decoder can feed predicted reference 224 to spatialprediction stage 2042 or temporal prediction stage 2044 for performing aprediction operation in the next iteration of process 300B. For example,if the current BPU is decoded using the intra prediction at spatialprediction stage 2042, after generating prediction reference 224 (e.g.,the decoded current BPU), the decoder can directly feed predictionreference 224 to spatial prediction stage 2042 for later usage (e.g.,for extrapolation of a next BPU of the current picture). If the currentBPU is decoded using the inter prediction at temporal prediction stage2044, after generating prediction reference 224 (e.g., a referencepicture in which all BPUs have been decoded), the encoder can feedprediction reference 224 to loop filter stage 232 to reduce or eliminatedistortion (e.g., blocking artifacts). The decoder can apply a loopfilter to prediction reference 224, in a way as described in FIG. 2B.The loop-filtered reference picture can be stored in buffer 234 (e.g., adecoded picture buffer in a computer memory) for later use (e.g., to beused as an inter-prediction reference picture for a future encodedpicture of video bitstream 228). The decoder can store one or morereference pictures in buffer 234 to be used at temporal prediction stage2044. In some embodiments, when the prediction mode indicator ofprediction data 206 indicates that inter prediction was used to encodethe current BPU, prediction data can further include parameters of theloop filter (e.g., a loop filter strength).

FIG. 4 is a block diagram of an example apparatus 400 for encoding ordecoding a video, consistent with embodiments of the disclosure. Asshown in FIG. 4 , apparatus 400 can include processor 402. Whenprocessor 402 executes instructions described herein, apparatus 400 canbecome a specialized machine for video encoding or decoding. Processor402 can be any type of circuitry capable of manipulating or processinginformation. For example, processor 402 can include any combination ofany number of a central processing unit (or “CPU”), a graphicsprocessing unit (or “GPU”), a neural processing unit (“NPU”), amicrocontroller unit (“MCU”), an optical processor, a programmable logiccontroller, a microcontroller, a microprocessor, a digital signalprocessor, an intellectual property (IP) core, a Programmable LogicArray (PLA), a Programmable Array Logic (PAL), a Generic Array Logic(GAL), a Complex Programmable Logic Device (CPLD), a Field-ProgrammableGate Array (FPGA), a System On Chip (SoC), an Application-SpecificIntegrated Circuit (ASIC), or the like. In some embodiments, processor402 can also be a set of processors grouped as a single logicalcomponent. For example, as shown in FIG. 4 , processor 402 can includemultiple processors, including processor 402 a, processor 402 b, andprocessor 402 n.

Apparatus 400 can also include memory 404 configured to store data(e.g., a set of instructions, computer codes, intermediate data, or thelike). For example, as shown in FIG. 4 , the stored data can includeprogram instructions (e.g., program instructions for implementing thestages in processes 200A, 200B, 300A, or 300B) and data for processing(e.g., video sequence 202, video bitstream 228, or video stream 304).Processor 402 can access the program instructions and data forprocessing (e.g., via bus 410), and execute the program instructions toperform an operation or manipulation on the data for processing. Memory404 can include a high-speed random-access storage device or anon-volatile storage device. In some embodiments, memory 404 can includeany combination of any number of a random-access memory (RAM), aread-only memory (ROM), an optical disc, a magnetic disk, a hard drive,a solid-state drive, a flash drive, a security digital (SD) card, amemory stick, a compact flash (CF) card, or the like. Memory 404 canalso be a group of memories (not shown in FIG. 4 ) grouped as a singlelogical component.

Bus 410 can be a communication device that transfers data betweencomponents inside apparatus 400, such as an internal bus (e.g., aCPU-memory bus), an external bus (e.g., a universal serial bus port, aperipheral component interconnect express port), or the like.

For ease of explanation without causing ambiguity, processor 402 andother data processing circuits are collectively referred to as a “dataprocessing circuit” in this disclosure. The data processing circuit canbe implemented entirely as hardware, or as a combination of software,hardware, or firmware. In addition, the data processing circuit can be asingle independent module or can be combined entirely or partially intoany other component of apparatus 400.

Apparatus 400 can further include network interface 406 to provide wiredor wireless communication with a network (e.g., the Internet, anintranet, a local area network, a mobile communications network, or thelike). In some embodiments, network interface 406 can include anycombination of any number of a network interface controller (NIC), aradio frequency (RF) module, a transponder, a transceiver, a modem, arouter, a gateway, a wired network adapter, a wireless network adapter,a Bluetooth adapter, an infrared adapter, a near-field communication(“NFC”) adapter, a cellular network chip, or the like.

In some embodiments, optionally, apparatus 400 can further includeperipheral interface 408 to provide a connection to one or moreperipheral devices. As shown in FIG. 4 , the peripheral device caninclude, but is not limited to, a cursor control device (e.g., a mouse,a touchpad, or a touchscreen), a keyboard, a display (e.g., acathode-ray tube display, a liquid crystal display, or a light-emittingdiode display), a video input device (e.g., a camera or an inputinterface coupled to a video archive), or the like.

It should be noted that video codecs (e.g., a codec performing process200A, 200B, 300A, or 300B) can be implemented as any combination of anysoftware or hardware modules in apparatus 400. For example, some or allstages of process 200A, 200B, 300A, or 300B can be implemented as one ormore software modules of apparatus 400, such as program instructionsthat can be loaded into memory 404. For another example, some or allstages of process 200A, 200B, 300A, or 300B can be implemented as one ormore hardware modules of apparatus 400, such as a specialized dataprocessing circuit (e.g., an FPGA, an ASIC, an NPU, or the like).

In VVC, a coding tool called luma mapping with chroma scaling (“LMCS”)can be added as a new processing block before the loop filters. LMCS hastwo main components: 1) in-loop mapping of the luma component based onadaptive piecewise linear models; and 2) for the chroma components,luma-dependent chroma residual scaling is applied. The in-loop mappingof the luma component adjusts the dynamic range of the input signal byredistributing the codewords across the dynamic range to improvecompression efficiency. Chroma residual scaling is designed tocompensate for the interaction between the luma signal and itscorresponding chroma signals.

In VVC (e.g., VVC draft 8), LMCS can be controlled at a sequence level,a picture level, or a slice level. FIG. 5 shows an example pseudocodeincluding a control variable enabling luma mapping with chroma scalingat a sequence level. As shown in FIG. 5 , when sps_1mcs_enabled_flag isequal to 1, the luma mapping with chroma scaling is used in the codedlayer video sequence (“CLVS”). When sps _1mcs_enabled_flag is equal to0, luma mapping with chroma scaling is not used in the CLVS.

FIG. 6 shows an example pseudocode including a control variable forenabling luma mapping with chroma scaling in a picture header. As shownin FIG. 6 , when ph_1mcs_enabled_flag is equal to 1, the luma mappingwith chroma scaling is enabled for all slices associated with the PH.When ph _1mcs_enabled flag is equal to 0, the luma mapping with chromascaling may be turned off for one, or more, or all slices associatedwith the PH. When not present, the value of ph _1mcs_enabled flag isinferred to be equal to 0.

As shown in FIG. 6 , the chroma residual scaling process can beseparately controlled with a picture level flag (e.g.,ph_chroma_residual_scale flag). When ph_chroma_residual_scale_flag isequal to 1, the chroma residual scaling is enabled for all slicesassociated with the PH. When ph_chroma_residual_scale_flag is equal to0, the chroma residual scaling may be turned off for one, or more, orall slices associated with the PH. When ph_chroma_residual_scale_flag isnot present, it is inferred to be equal to 0.

FIG. 7 shows an example pseudocode including a control variable enablingfor enabling luma mapping with chroma scaling in a slice header. Asshown in FIG. 7 , when slice_1mcs_enabled_flag is equal to 1, the lumamapping with chroma scaling is enabled for the current slice. When slice_1mcs_enabled_flag is equal to 0, luma mapping with chroma scaling isnot enabled for the current slice. When slice _1mcs_enabled flag is notpresent, it is inferred to be equal to 0.

Adaptive loop filter (“ALF”) is an in-loop filter that can be applied onreconstructed samples to reduce distortions of the samples to improvethe coding efficiency. The filter coefficients are decided by theencoder and signaled in the bitstream.

In VVC (e.g., VVC draft 8), ALF can be controlled at the sequence level,and at one of the picture level or the slice level. The ALF may not beapplied at both the picture level and the slice level. FIG. 8A shows anexample pseudocode including adaptive loop filter syntax in a sequenceparameter set. FIG. 8B shows an example pseudocode including adaptiveloop filter syntax in a picture parameter set. FIG. 9 shows an examplepseudocode including adaptive loop filter syntax in a picture header.FIG. 10 shows an example pseudocode including adaptive loop filtersyntax in a slice header. As shown in FIG. 8A, variablesps_alf_enabled_flag in the sequence parameter set (“SPS”) controls theALF for the CLVS. When sps_alf_enabled flag is equal to 1, ALF isenabled for the CLVS. When sps alf enabled flag is equal to 0, ALF isdisabled for the CLVS. As shown in FIG. 8B, FIG. 9 , and FIG. 10 , whenALF is enabled for the CLVS, it can be further controlled at the picturelevel by ph_alf_enabled_flag or at the slice level byslice_alf_enabled_flag. Whether it is controlled at the picture level orthe slice level is decided by the flag alf_info_in_ph_flag, which issignaled in a picture parameter set (“PPS”). When ph_alf_enabled_flag isequal to 1, the ALF coefficients information is signaled in the pictureheader. When slice _alf_enabled flag is equal to 1, the ALF coefficientinformation is signaled in slice header.

When sps_alf_enabled flag is equal to 0, the adaptive loop filter isturned off (e.g., disabled). When sps_alf_enabled_flag equal to 1, theadaptive loop filter is enabled.

When sps_ccalf_enabled_flag is equal to 0, the cross-component adaptiveloop filter is turned off. When sps_ccalf_enabled_flag equal to 1, thecross-component adaptive loop filter may be enabled.

When alf_info_in_ph_flag is equal to 1, ALF information is present inthe PH syntax structure and not present in slice headers referring tothe PPS that do not contain a PH syntax structure. Whenalf_info_in_ph_flag is equal to 0, ALF information is not present in thePH syntax structure and may be present in slice headers referring to thePPS that do not contain a PH syntax structure.

When ph_alf_enabled_flag is equal to 1, adaptive loop filter is enabledfor all slices associated with the PH and may be applied to Y, Cb, or Crcolour component in the slices. When ph_alf_enabled_flag is equal to 0,adaptive loop filter may be disabled for one, or more, or all slicesassociated with the PH. When not present, ph_alf_enabled_flag isinferred to be equal to 0.

The variable ph_num_alf_aps_ids_luma specifies the number of ALF APSsthat the slices associated with the PH refers to.

The variable ph_alf_aps_id_luma[i] specifies theadaptation_parameter_set_id of the i-th ALF APS that the luma componentof the slices associated with the PH refers to.

The variable alf_luma_filter_signal_flag of the APS NAL unit havingaps_params_type equal to ALF_APS and adaptation_parameter_set_id equalto ph_alf_aps_id_luma [i] should be equal to 1.

The Tempora1Id of the APS NAL unit having aps_params_type equal toALF_APS and adaptation_parameter_set_id equal to ph_alf_aps_id_luma[ i]should be less than or equal to the Tempora1Id of the pictureassociated with the PH.

When ph_alf_chroma_idc is equal to 0, the adaptive loop filter is notapplied to Cb and Cr colour components. When ph_alf_chroma idc is equalto 1, the adaptive loop filter is applied to the Cb colour component.When ph_alf_chroma_idc is equal to 2, the adaptive loop filter isapplied to the Cr colour component. When ph_alf_chroma _idc equal to 3,the adaptive loop filter is applied to Cb and Cr colour components. Whenph_alf_chroma _idc is not present, it is inferred to be equal to 0.

The variable ph_alf_aps_id_chroma specifies theadaptation_parameter_set_id of the ALF APS that the chroma component ofthe slices associated with the PH refers to.

The value of the alf_chroma filter_signal flag of the APS NAL unithaving aps_params_type equal to ALF_APS and adaptation_parameter_set_idequal to ph_alf_aps_id_chroma should be equal to 1.

The Tempora1Id of the APS NAL unit having aps_params_type equal toALF_APS and adaptation_parameter_set_id equal to ph_alf_aps_id_chromashould be less than or equal to the Tempora1Id of the picture associatedwith the PH.

When ph_cc_alf_cb_enabled_flag is equal to 1, cross-component filter forCb colour component is enabled for all slices associated with the PH,and may be applied to Cb colour component in the slices. Whenph_cc_alf_cb_enabledflag is equal to 0, cross-component filter for Cbcolour component may be turned off for one, or more, or all slicesassociated with the PH. When not present, ph_cc_alf_cb_enabledflag isinferred to be equal to 0.

The variable ph_cc_alf_cb_aps_id specifies theadaptation_parameter_set_id of the ALF APS that the Cb colour componentof the slices associated with the PH refers to.

The value of of alf_cc_cb_filter_signal_flag of the APS NAL unit havingaps_params_type equal to ALF_APS and adaptation_parameter_set_id equalto ph_cc_alf_cb_aps_id should be equal to 1.

When ph_cc_alf_cr_enabled_flag is equal to 1, cross-component filter forCr colour component is enabled for all slices associated with the PH,and may be applied to Cr colour component in the slices. Whenph_cc_alf_cr_enabledflag is equal to 0, cross-component filter for Crcolour component may be turned off for one, or more, or all slicesassociated with the PH. When not present, ph_cc_alf_cr_enabled_flag isinferred to be equal to 0.

The variable ph_cc_alf_cr_aps_id specifies theadaptation_parameter_set_id of the ALF APS that the Cr colour componentof the slices associated with the PH refers to.

The value of alf_cc_cr_filter_signal_flag of the APS NAL unit havingaps_params_type equal to ALF_APS and adaptation_parameter_set_id equalto ph_cc_alf_cr_aps_id should be equal to 1.

When slice_alf_enabled_flag is equal to 1, adaptive loop filter isenabled and may be applied to Y, Cb, or Cr colour component in a slice.When slice_alf_enabledflag equal to 0, adaptive loop filter is turnedoff for all colour components in a slice. When not present, the value ofslice_alf_enabled_flag is inferred to be equal to ph_alf_enabled_flag.

The variable slice_num_alf_aps_ids_luma specifies the number of ALF APSsthat the slice refers to. When slice_alf_enabledflag is equal to 1 andslice_num_alf_aps_ids_luma is not present, the value of slice_num_alf_aps_ids_luma is inferred to be equal to the value ofph_num_alf_aps_ids_luma.

The variable slice alf_aps _id_luma[ i ] specifies theadaptation_parameter_set_id of the i-th ALF APS that the luma componentof the slice refers to. The Tempora1Id of the APS NAL unit havingaps_params_type equal to ALF_APS and adaptation_parameter_set_id equalto slice_alf_aps_id_luma[ i ] should be less than or equal to theTempora1Id of the coded slice NAL unit. When slice_alf_enabled flag isequal to 1 and slice_alf_aps_id_luma[ i ] is not present, the value ofslice_alf_aps_id_luma[ i ]is inferred to be equal to the value ofph_alf_aps_id_luma[ i ].

The value of alf_luma filter_signal flag of the APS NAL unit havingaps_params_type equal to ALF_APS and adaptation_parameter_set_id equalto slice_alf_aps_id_luma[ i ] should be equal to 1.

When slice_alf_chroma_idc is equal to 0, the adaptive loop filter is notapplied to Cb and Cr colour components. When slice_alf_chroma_idc equalto 1, the adaptive loop filter is applied to the Cb colour component.When slice_alf_chroma _idc equal to 2, the adaptive loop filter isapplied to the Cr colour component. When slice_alf_chroma_idc is equalto 3, the adaptive loop filter is applied to Cb and Cr colourcomponents. When slice_alf_chroma _idc is not present, it is inferred tobe equal to ph_alf_chroma_idc.

The variable slice_alf_aps_id_chroma specifies theadaptation_parameter_set_id of the ALF APS that the chroma component ofthe slice refers to. The Tempora1Id of the APS NAL unit havingaps_params_type equal to ALF_APS and adaptation_parameter_set_id equalto slice_alf_aps_id_chroma should be less than or equal to theTempora1Id of the coded slice NAL unit. When slice_alf_enabled_flag isequal to 1 and slice_alf_aps_id_chroma is not present, the value ofslice_alf_aps_id_chroma is inferred to be equal to the value ofph_alf_aps_id_chroma.

The value of alf_chroma filter_signal flag of the APS NAL unit havingaps_params_type equal to ALF_APS and adaptation_parameter_set_id equalto slice_alf_aps_id_chroma should be equal to 1.

When slice_cc_alf_cb_enabled_flag is equal to 0, the cross-componentfilter is not applied to the Cb colour component. When slice_cc_alf_cb_enabled_flag is equal to 1, the cross-component filter isenabled and may be applied to the Cb colour component. When slice_cc_alf_cb_enabled_flag is not present, it is inferred to be equal toph_cc_alf_cb_enabled_flag.

The variable slice_cc_alf_cb_aps_id specifies theadaptation_parameter_set_id that the Cb colour component of the slicerefers to.

The Tempora1Id of the APS NAL unit having aps_params_type equal toALF_APS and adaptation_parameter_set_id equal to slice_cc_alf_cb_aps_idshould be less than or equal to the Tempora1Id of the coded slice NALunit. When slice_cc_alf_cb_enabledflag is equal to 1 andslice_cc_alf_cb_aps_idis not present, the value ofslice_cc_alf_cb_aps_idis inferred to be equal to the value ofph_cc_alf_cb_aps_id.

The value of alf_cc_cb_filter_signal_flag of the APS NAL unit havingaps_params_type equal to ALF_APS and adaptation_parameter_set_id equalto slice_cc_alf_cb_aps_id should be equal to 1.

When slice_cc_alf_cr_enabled_flag is equal to 0, the cross-componentfilter is not applied to the Cr colour component. Whenslice_cc_alf_cb_enabled_flag is equal to 1, the cross-component adaptiveloop filter is enabled and may be applied to the Cr colour component.When slice_cc_alf_cr_enabled_flag is not present, it is inferred to beequal to ph_cc_alf_cr_enabled_flag.

The variable slice_cc_alf_cr_aps_id specifies theadaptation_parameter_set_id that the Cr colour component of the slicerefers to. The Tempora1Id of the APS NAL unit having aps_params_typeequal to ALF_APS and adaptation_parameter_set_id equal toslice_cc_alf_cr_aps_id should be less than or equal to the Tempora1Id ofthe coded slice NAL unit. When slice_cc_alf_cr_enabled flag is equal to1 and slice_cc_alf_cr_aps_id is not present, the value of slice_cc_alf_cr_aps_idis inferred to be equal to the value ofph_cc_alf_cr_aps_id.

The value of alf_cc_cr_filtersignalflag of the APS NAL unit havingaps_params_type equal to ALF_APS and adaptation_parameter_set_id equalto slice_cc_alf_cr_aps_id should be equal to 1.

Sample adaptive offset (“SAO”) adds an offset to the reconstructedsample to reduce the distortion of the sample. Two kind of offset modesare supported in SAO, namely an edge offset (“EO”) mode and a bandoffset (“BO”) mode. For edge offset mode, samples in a coding tree unit(“CTU”) are first classified into 5 classes of which samples in 4classes have corresponding offsets. Therefore, 4 offset values aredetermined by encoder, one offset for one class. The classificationmethod and the value of offsets are signaled in bitstream at the CTUlevel. For band offset mode, according to the sample value, the samplesin a CTU are divided into 32 bands of which samples in 4 bands havecorresponding offsets. The 4 bands to be offset and the correspondingoffset are signaled in the bitstream.

In VVC (e.g., VVC draft 8), same as ALF, SAO can be controlled at thesequence level, and one of the picture level or the slice level. SAO maynot be controlled at both the picture level and the slice level. FIG. 11shows an example pseudocode including sample adaptive offset syntax in asequence parameter set. FIG. 12 shows an example pseudocode includingsample adaptive offset syntax in a picture parameter set. FIG. 13 showsan example pseudocode including sample adaptive offset syntax in apicture header. FIG. 14 shows an example pseudocode including sampleadaptive offset syntax in a slice header. As shown in FIG. 11 , variablesps_sao_enabled_flag in the SPS controls the SAO for the CLVS. Whensps_sao_enabled_flag is equal to 1, SAO is enabled for the CLVS. Whensps_sao_enabled_flag is equal to 0, SAO is turned off for the CLVS.

As shown in FIG. 12 , FIG. 13 and FIG. 14 , when SAO is enabled for theCLVS, it can be further controlled at the picture level byph_sao_luma_enabled_flag/ph_sao_chroma_enabled_flag or the slice levelby slice_sao_luma_flag/slice_sap_chroma_flag. Whether it is controlledat the picture level or the slice level is decided by the flagsao_info_in_ph_flag which is signaled in the PPS.

When sps_sao_enabled_flag is equal to 1, the sample adaptive offsetprocess is applied to the reconstructed picture after the deblockingfilter process. When sps_sao_enabled_flag is equal to 0, the sampleadaptive offset process is not applied to the reconstructed pictureafter the deblocking filter process.

When sao_info_in_ph_flag is equal to 1, SAO filter information ispresent in the PH syntax structure and not present in slice headersreferring to the PPS that do not contain a PH syntax structure. Whensao_info_in_ph_flag is equal to 0, SAO filter information is not presentin the PH syntax structure and may be present in slice headers referringto the PPS that do not contain a PH syntax structure.

When ph_sao_luma_enabled_flag is equal to 1, SAO is enabled for the lumacomponent in all slices associated with the PH. Whenph_sao_luma_enabled_flag is equal to 0, SAO for the luma component maybe turned off for one, or more, or all slices associated with the PH.When ph_sao_luma_enabled_flag is not present, it is inferred to equal to0.

When ph_sao_chroma_enabled_flag is eequal to 1, that SAO is enabled forthe chroma component in all slices associated with the PH. Whenph_sao_chroma_enabled_flag is equal to 0, SAO for chroma component maybe turned off for one, or more, or all slices associated with the PH.When ph_sao_chroma_enabled_flag is not present, it is inferred to beequal to 0.

When slice_sao_luma_flag is equal to 1, SAO is enabled for the lumacomponent in the current slice. When slice_sao_luma_flag is equal to 0,SAO is turned off for the luma component in the current slice. Whenslice_sao_luma_flag is not present, it is inferred to be equal toph_sao_luma_enabled_flag.

When slice_sao_chroma_flag is equal to 1, SAO is enabled for the chromacomponent in the current slice. When slice_sao_chroma_flag is equal to0, SAO is turned off for the chroma component in the current slice. Whenslice_sao_chroma_flag is not present, it is inferred to be equal toph_sao_chroma_enabled_flag.

Deblocking filter (“DBF”) is a filter applied on the boundaries of theblocks to reduce the block artifacts. In VVC (e.g., VVC draft 8), DBFdisabled flag and parameters are signaled in PPS. In addition, anoverriding enabled flag deblocking filter__override_enabled_flag is alsosignaled to indicate whether the DBF disabled flag and parameters can beoverridden in low level. If so, a flag dbf_info_in_ph_flag is signaledto indicate whether DBF disabled flag and parameters are overridden inthe picture header or the slice header.

FIG. 15 shows an example pseudocode including deblocking filter syntaxin a picture parameter set. FIG. 16 shows an example pseudocodeincluding deblocking filter syntax in a picture header. FIG. 17 shows anexample pseudocode including deblocking filter syntax in a slice header.As shown in FIG. 15 , FIG. 16 , and FIG. 17 , if the DBF disabled flagand parameters are overridden in picture header, a picture level DBFdisabled flag and DBF parameters can be signaled in picture header. Ifthe DBF disabled flag and parameters are overridden in slice header, aslice level DBF disabled flag and DBF parameters can be signaled inslice header.

When deblocking_filter_control_present_flag is equal to 1, thedeblocking filter control syntax elements is present in the PPS. Whendeblocking_filter_control_present_flag is equal to 0, deblocking filtercontrol syntax elements is absent in the PPS.

When deblocking_filter_override_enabled_flag is equal to 1,ph_deblocking_filter_override_flag is present in the PHs referring tothe PPS, or slice_deblocking_filter_override_flag is present in theslice headers referring to the PPS. Whendeblocking_filter_override_enabled_flag is equal to 0,ph_deblockingfilter__override_flag is absent in PHs referring to the PPSor slice _deblockingfilter__override_flag is absent in slice headersreferring to the PPS. When not present, the value of deblockingfilter_override_enabled_flag is inferred to be equal to 0.

When pps_deblocking_filter_disabled_flag is equal to 1, the operation ofdeblocking filter is not applied for slices referring to the PPS inwhich slice _deblocking_filter_disabledflag is not present. Whenpps_deblocking_filter_disabled_flag is equal to 0, the operation of thedeblocking filter is applied for slices referring to the PPS in whichslice _deblocking filter_disabled flag is not present. When not present,the value of pps_deblockingfilter_disabled_flag is inferred to be equalto 0.

When ph_deblocking_filter_override_flag is equal to 1, deblockingparameters are present in the PH. Whenph_deblocking_filter_override_flag is equal to 0, deblocking parametersare not present in the PH. When not present, the value ofph_deblocking_filter_overrideflag is inferred to be equal to 0.

When ph_deblocking_filter_disabled_flag is equal to 1, the operation ofthe deblocking filter is not applied for the slices associated with thePH. When ph_deblocking_filter_disabled_flag equal to 0, ]] the operationof the deblocking filter is applied for the slices associated with thePH. When ph_deblocking_filter_disabled_flag is not present, it isinferred to be equal to pps_deblocking_filter_disabled_flag.

When slice_deblocking_filter_override_flag is equal to 1, deblockingparameters are present in the slice header. Whenslice_deblocking_filter_override_flag is equal to 0, deblockingparameters are not present in the slice header. When not present, thevalue of slice_deblocking_filter_override_flag is inferred to be equalto ph_deblocking_filter_override_flag.

When slice_deblocking_filter_disabled_flag is equal to 1, the operationof the deblocking filter is not applied for the current slice. Whenslice_deblocking_filter_disabled_flag is equal to 0, the operation ofthe deblocking filter is applied for the current slice. Whenslice_deblocking_filter_disabled_flag is not present, it is inferred tobe equal to ph_deblocking_filter_disabled_flag.

There are many issues with the current design of the VVC. First, LMCScan be controlled in the CLVS level, the picture level, and the slicelevel. When a higher level enabled flag enables LMCS, the lower levelcan turn it off. In other words, the enabled flag being equal to 1 at agiven level does not mean that LMCS must be enabled, since a lower levelenabled flag may turn it off. Similarly, when the SPS enabled flagenables ALF and SAO, the picture level or the slice level enabled flagmay turn them off. As a result, the current semantics is not accurate.

Moreover. When ph_lmcs_enabled_flag is equal to 1,ph_chroma_residual_scale_flag can still turn off (e.g., disable) chromascaling for current picture. As a result, ph_lmcs_enabled_flag beingequal to 1 does not mean that chroma scaling must be enabled. Therefore,the current semantics is not accurate.

Another issue is with syntax consistency. There are severalinconsistencies between ALF/SAO and LMCS syntax. LMCS can be controlledin three levels, namely SPS, PH and SH. When it is enabled in a higherlevel, the lower level can turn it off. When it is turned off in ahigher level, a lower level may not enable it. For ALF and SAO, however,they can only be controlled at two levels, namely SPS and one of PH orSH. The decision of PH level controlling or SH level controlling for ALFand SAO is decided by a flag in the PPS. As a result, the controllingmechanism is different between LMCS and ALF/SAO.

In addition, when ALF is controlled in PH and enabled, the parameterinformation of ALF is signaled in PH. When ALF is controlled in SH andenabled, the parameter information of ALF is signaled in SH. Therefore,for ALF, when the control is at the slice level, different slices mayhave different ALF parameters. In contrast, for LMCS, SH can only enableor turn off (e.g., disable) but cannot signal the parameter informationwhen enabled. In other words, LMCS parameters needs to be the same forall the slices (that enable LMCS) within the same picture. This isanother inconsistency between ALF and LMCS.

A third issue is with the deblocking filter syntax. There is no SBSdisabled flag to disable DBF for the whole CLVS. Moreover, the semanticsof pps_deblocking_filter_disabled_flag andph_deblocking_filter_disabled_flag are not correct. In VVC (e.g., VVCdraft 8), pps_deblocking_filter_disabled_flag being equal to 1 (or 0)specifies that the operation of deblocking filter is not applied (orapplied) for slices referring to the PPS in whichslice_deblocking_filter_disabled_flag is not present. However,ph_deblocking_filter_disabled_flag can override thepps_deblocking_filter_disabled_flag, and thus the semantics ofpps_deblocking_filter_ disabled _flag is not accurate. Additionally,according to VVC (e.g., VVC draft 8), ph_deblocking_filter_disabled_flagbeing equal to 1 (or 0) specifies that the operation of the deblockingfilter is not applied (or applied) for the slices associated with thePH. When ph_deblocking_filter_disabled_flag is not present, it isinferred to be equal to pps_deblocking_filter_disabled_flag.However, inthe case that slice_deblocking_filter_disabled_flag overridespps_deblocking_filter_disabled_flag, ph_deblocking_filter_disabled_flagis not present, and thus it is inferred to be equal topps_deblocking_filter_disabled_flag.But sincepps_deblocking_filter_disabled_flag is overridden byslice_deblocking_filter_disabled_flag, the value ofpps_deblocking_filter_disabled_flag may be not applicable to the thatslice. Thus, the semantics of ph_deblocking_filter_disabled_flag isincorrect.

Embodiments of the present disclosure provides a method to combat theissues described above. In some embodiments, semantics can be modifiedbased on the consideration that low level enabled flag of LMCS, ALF andSAO may turn off (e.g., disable) LMCS, ALF and SAO when high levelenabled flag enables them, and chroma scaling may be turned off whenLMCS flag is enabled. FIG. 18 shows example semantics for luma mappingwith chroma scaling, adaptive loop filter, and sample adaptive offset,according to some embodiments of the present disclosure. As shown inFIG. 18 , changes from the previous VVC are shown in bold, with proposeddeleted syntax being further shown in strikethrough.

In some embodiments, semantics can be modified in the following manner:when ALF or SAO is enabled in a higher level, a lower level can turnthem off. When ALF or SAO is turned off in a higher level, a lower levelmay not enable them. Moreover, for ALF, when it is controlled in SH, itcan only be enabled or disabled, and slice specific ALF parameters maynot be signaled in SH. As a result, all the slices in a picture canshare the same ALF parameters.

FIG. 19 shows an example pseudocode including a novel picture parameterset for adaptive loop filter, according to some embodiments of thepresent disclosure. FIG. 20 shows an example pseudocode including anovel picture header syntax for adaptive loop filter, according to someembodiments of the present disclosure. FIG. 21 shows an examplepseudocode including a novel slice header syntax for adaptive loopfilter, according to some embodiments of the present disclosure. Asshown in FIG. 19 , FIG. 20 , and FIG. 21 , changes from the previous VVCare shown in bold, with proposed deleted syntax being further shown instrikethrough. As shown in FIG. 19 , FIG. 20 , and FIG. 21 , PPS levelsignaling is simplified by removing alf_info_in_ph_flag and cleaning upthe ALF parameter signaling syntax in the slice header.

FIG. 22 shows an example semantics including novel flags for pictureheader syntax, slice header syntax, and picture parameter set of anadaptive loop filter, according to some embodiments of the presentdisclosure. As shown in FIG. 22 , changes from the previous VVC areshown in bold, with proposed deleted syntax being further shown instrikethrough. It is appreciated that the semantics shown in FIG. 22 canbe applied to the pseudocode in FIG. 19 , FIG. 20 , or FIG. 21 .

FIG. 23 shows an example pseudocode including a novel picture parameterset for sample adaptive offset, according to some embodiments of thepresent disclosure. FIG. 24 shows an example pseudocode including anovel picture header syntax for sample adaptive offset, according tosome embodiments of the present disclosure. FIG. 25 shows an examplepseudocode including a novel slice header syntax for sample adaptiveoffset, according to some embodiments of the present disclosure. Asshown in FIG. 23 , FIG. 24 , and FIG. 25 , changes from the previous VVCare shown in bold, with proposed deleted syntax being further shown instrikethrough. As shown in FIG. 23 , FIG. 24 , and FIG. 25 , PPS levelsignaling is simplified by removing sao_info_in_ph_flag.

FIG. 26 shows an example semantics including novel flags for pictureheader syntax, slice header syntax, and picture parameter set of asample adaptive offset, according to some embodiments of the presentdisclosure. As shown in FIG. 26 , changes from the previous VVC areshown in bold, with proposed deleted syntax being further shown instrikethrough. It is appreciated that the semantics shown in FIG. 26 canbe applied to the pseudocode in FIG. 23 , FIG. 24 , or FIG. 25 .

In some embodiments, an SPS disable flag can be added for DBF.

In some embodiments, since pps_deblocking_filter_disabled_flag may beoverriden by ph_deblocking_filter_disabled_flag orslice_deblocking_filter_disabled flag,pps_deblocking_filter_disabled_flag is only applicable when overridingmechanism is disabled (e.g., both ph_deblocking_filter_disabled_flag andslice_deblocking_filter_disabled_flag are not present), andph_deblocking_filter_disabled_flag is only applicable whenph_deblocking_filter_disabled_flag overridespps_deblocking_filter_disabled_flag (e.g.,ph_deblocking_filter_disabled_flag is present, butslice_deblocking_filter_disabled_flag is not present).

FIG. 27 shows an example pseudocode including a novel sequence parameterset with a sequence parameter set disabled flag for deblocking filter,according to some embodiments of the present disclosure. FIG. 28 showsan example pseudocode including a novel picture parameter set with asequence parameter set disabled flag for deblocking filter, according tosome embodiments of the present disclosure. FIG. 29 shows an examplepseudocode including a novel picture header syntax with a sequenceparameter set disabled flag for deblocking filter, according to someembodiments of the present disclosure. FIG. 30 shows an examplepseudocode including a novel slice header syntax with a sequenceparameter set disabled flag for deblocking filter, according to someembodiments of the present disclosure. As shown in FIG. 27 , FIG. 28 ,FIG. 29 , and FIG. 30 , changes from the previous VVC are shown in bold,with proposed deleted syntax being further shown in strikethrough.

FIGS. 31A/B shows an example semantics including novel flags for pictureheader syntax, slice header syntax, sequence parameter set, and pictureparameter set of a deblocking filter, according to some embodiments ofthe present disclosure. As shown in FIG. 26 , changes from the previousVVC are shown in bold, with proposed deleted syntax being further shownin strikethrough. It is appreciated that the semantics shown in FIGS.31A/B can be applied to the pseudocode in FIG. 27 , FIG. 28 , FIG. 29 ,or FIG. 30 .

FIG. 32 is a flow chart depicting an exemplary process for determiningluma mapping with chroma scaling (LMCS), consistent with the presentdisclosure. Process 3200 may be performed by a codec (e.g., an encoderin FIGS. 2A-2B or a decoder in FIGS. 3A-3B). For example, the codec canbe implemented as one or more software or hardware components of anapparatus (e.g., apparatus 400 in FIG. 4 ) for determining LMCS, such asa processor (e.g., processor 402) of the apparatus. The method caninclude the following steps.

In step 3202, apparatus 400 receives video frame or frames. A video asused herein may refer to a temporal sequence of “frames” (e.g., staticimages or pictures) capturing the visual information. A video capturedevice (e.g., a camera) can be used to capture and store those picturesin a temporal sequence, and a video playback device (e.g., a television,a computer, a smartphone, a tablet computer, a video player, or anyend-user terminal with a function of display) can be used to displaysuch pictures in the temporal sequence. Also, in some applications, avideo capturing device can transmit the captured video to the videoplayback device (e.g., a computer with a monitor) in real-time, such asfor surveillance, conferencing, or live broadcasting.

In step 3204, apparatus 400 determines a control flag for the videoframe at the sequence level. In some embodiments, a video frame mayinclude a sequence of pictures, and each picture may include one or moreslices. The control flag for the sequence may be an indication of astatus of for all pictures in the sequence. In some embodiments, thecontrol flag may be an indication of whether the video frame is to beencoded with luma mapping with chroma scaling (LMCS). The control flagof the sequence may be an example of a first control flag. By way ofexample depicted in FIG. 18 , sps_lmcs_enabled_flag may be a controlflag for LMCS at the sequence level. In some embodiments,sps_lmcs_enabled_flag may have a value of “1” or “0.”

In step 3206, apparatus 400 checks for the value of the control flag forLMCS at the sequence level to determine if LMCS is enabled at thesequence level. If LMCS is not enabled at the sequence level, step 3206is “No,” and process 3200 proceeds to step 3222. When LMCS is notenabled at the sequence level, LMCS is also not enabled for all picturesand all slices of the video frame of the sequence. In some embodiments,step 3206 is “No” when sps_lmcs_enabled_flag has a value of “0.” If LMCSis enabled at the sequence level, step 3206 is “Yes,” and process 3200proceeds to step 3208. When LMCS is enabled at the sequence level, theall pictures in the sequence may be enabled. In some embodiments, step3206 is “Yes” when sps_lmcs_enabled_flag has a value of “1.”

In step 3208, apparatus 400 determines a control flag for the videoframe at picture level for a picture in the sequence. In someembodiments, a picture of the video frame within a sequence may includeone or more slices. The control flag for the picture may be anindication of a status of for all slices in the picture. In someembodiments, the control flag may be an indication of whether a pictureof the video frame is to be encoded with luma mapping with chromascaling (LMCS). The control flag of the picture may be an example of asecond control flag. By way of example depicted in FIG. 18 ,ph_lmcs_enabled_flag may be a control flag for LMCS at the picturelevel. In some embodiments, the control flag at the picture level ispresent in the picture header. In some embodiments, ph_lmcs_enabled_flagmay have a value of “1” or “0.”

In step 3210, apparatus 400 checks for the value of the control flag forLMCS at the picture level to determine if LMCS is enabled at the picturelevel. If LMCS is not enabled at picture level, step 3210 is “No,” andprocess 3200 proceeds to step 3212. When LMCS is not enabled at thepicture level, LMCS also not enabled for all slices of that picture ofthe video frame. In some embodiments, step 3210 is “No” whenph_lmcs_enabled_flag has a value of “0.” If LMCS is enabled at thepicture level, step 3210 “Yes,” and process 3200 proceeds to step 3214.When LMCS is enabled at the picture level, then all slices in thepicture may be enabled. In some embodiments, step 3210 is “Yes” whenph_lmcs_enabled_flag has a value of “1”

In some additional or alternative embodiments, apparatus 400 may, inresponse to determining LMCS is enabled for the picture level (step3210-Yes), check for value of a third control flag indicating whetherchroma scaling (CS) is enabled at the picture level for the video frame.As depicted in FIG. 18 , ph_chroma_residual_scale_flag may be an exampleof the third control flag. In some embodiments, CS is enabled whenph_chroma_residual_scale_flag equals to 1, and CS is not enabled whenph_chroma_residual_scale_flag equals to 0.

In step 3212, apparatus 400 checks if the picture is the last picture inthe sequence. If step 3212 is “No,” apparatus 400 proceeds to step 3208to determine the control flag for the video frame at the picture for thenext picture in the sequence. Regardless of whether step 3212 is “Yes”or “No,” process 3200 also proceeds to step 3222.

In step 3214, apparatus 400 determines a control flag for the videoframe at the slice level for slice in the picture as determined in step3208. The control flag for the slice may be an indication of a statusfor a specific slice in the picture. In some embodiments, the controlflag may be an indication of whether a slice of the picture in a videoframe is to be encoded with luma mapping with chroma scaling (LMCS). Thecontrol flag of the slice may be an example of a fourth control flag. Byway of example depicted in FIG. 18 , slice_lmcs_enabled_flag may be acontrol flag for LMCS at the slice level. In some embodiments,slice_lmcs_enabled_flag may have a value of “1” or “0.”

In step 3216, apparatus 400 checks for the value of the control flag forLMCS at the slice level to determine if LMCS is enabled at the slicelevel. If LMCS is not enabled at slice level, step 3216 is “No,” andprocess 3200 proceeds to step 3218. In some embodiments, step 3216 is“No” when slice_lmcs_enabled_flag has a value of “0.” If LMCS is enabledat the slice level, step 3216 “Yes,” and process 3200 proceeds to step3220. In some embodiments, step 3216 is “Yes” whenslice_lmcs_enabled_flag has a value of “1.”

In step 3218, apparatus 400 checks if the slice is the last slice in thepicture. If step 3218 is “No,” apparatus 400 proceeds to step 3214 todetermine the control flag for the video frame at the slice for the nextslice in the picture. Regardless of whether step 3218 is “Yes” or “No,”process 3200 also proceeds to step 3222.

In step 3220, apparatus 400 encodes the slice, picture, and/or sequenceof the video frame with luma mapping (LM) enabled, and allowing chromascaling to be enabled. In some embodiments, in response to the secondflag indicating the LMCS is enabled at the picture level, luma mapping(LM) is enabled and the CS can be enabled at the slice level when theslice_lmcs_enabled_flag equals to 1.

In step 3222, apparatus 400 encodes the slice, picture, and/or sequenceof the video frame with luma mapping and chroma scaling not enabled.

FIG. 33 is a flow chart depicting an exemplary process for determiningcoding a video frame using adaptive loop filter (ALF), consistent withthe present disclosure. Process 3300 may be performed by apparatus 400and its sub-components, such as processor 3102.

In step 3302, apparatus 400 receives video frame or frames.

In step 3304, apparatus 400 determines a control flag for the videoframe at the sequence level. In some embodiments, the control flag maybe an indication of whether the video frame is to be encoded usingadaptive loop filter (ALF). The control flag of the sequence may be anexample of a first control flag. By way of example depicted in FIG. 18 ,sps_alf_enabled_flag may be a control flag for ALF at the sequencelevel. In some embodiments, sps_alf_enabled_flag may have a value of “1”or “0.” In some embodiments, if value of sps alf enabled flag is notspecified or missing, the default value may be “0.”

In step 3306, apparatus 400 checks for the value of the control flag forALF at the sequence level to determine if ALF is enabled at the sequencelevel. If ALF is not enabled at sequence level, step 3306 is “No,” andprocess 3300 proceeds to step 3322. When ALF is not enabled at thesequence level, ALF also not enabled for all pictures and all slices ofthe video frame. In some embodiments, step 3306 is “No” whensps_alf_enabled_flag has a value of “0.” If ALF is enabled at sequencelevel, step 3306 is “Yes,” and process 3300 proceeds to step 3308. WhenALF is enabled at the sequence level, then all pictures in the sequencemay be enabled. In some embodiments, step 3306 is “Yes” whensps_alf_enabled_flag has a value of “1.”

In step 3308, apparatus 400 determines a control flag for the videoframe at picture level for a picture in the sequence. In someembodiments, the control flag may be an indication of whether a pictureof the video frame is to be encoded using adaptive loop filter (ALF).The control flag of the picture may be an example of a second controlflag. By way of example depicted in FIG. 22A and FIG. 22B,ph_alf_enabled_flag may be a control flag for ALF at the picture level.In some embodiments, the control flag at the picture level is present inthe picture header. In some embodiments, ph_alf_enabled_flag may have avalue of “1” or “0.” In some embodiments, if value ofph_alf_enabled_flag is not specified or missing, the default value maybe “0.”

In step 3310, apparatus 400 checks for the value of the control flag forALF at the picture level to determine if ALF is enabled at the picturelevel. If ALF is not enabled at the picture level, step 3310 is “No,”and process 3300 proceeds to step 3312. When ALF is not enabled at thepicture level, ALF also not enabled for all slices of that picture ofthe video frame. In some embodiments, step 3310 is “No”when_ph_alf_enabled_flag has a value of “0.” If ALF is enabled atpicture level, step 3310 “Yes,” and process 3300 proceeds to step 3314.When ALF is enabled at the picture level then all pictures in thesequence may be enabled. In some embodiments, step 3310 is “Yes” whenph_alf_enabled_ flag has a value of “1.”

In some additional or alternative embodiments, the second control flagmay be a control flag for either the picture level or the slice level,depending on a third control flag signaled at a picture parameter set(PPS).

In some additional or alternative embodiments, apparatus 400 may, inresponse to determining ALF is enabled for the picture level (step3310-Yes), check for value of a fourth control flag indicating whetherCross Component Adaptive loop filter (CCALF) enabled at the picturelevel for the video frame for Cb color component. As depicted in FIG.22A, ph_cc_alf_cb_enabled_flag may be an example of the fourth controlflag.

In some additional or alternative embodiments, apparatus 400 may, inresponse to determining ALF is enabled for the picture level (step3310-Yes), check for value of a fifth control flag indicating whetherCross Component Adaptive loop filter (CCALF) enabled at the picturelevel for the video frame for Cr color component. As depeicted in FIG.22A, ph_cc_alf_cr_enabled_flag may be an example the fifth control flag.

In step 3312, apparatus 400 checks if the picture is the last picture inthe sequence. If step 3312 is “No,” apparatus 400 proceeds to step 3308to determine the control flag for the video frame at the picture levelfor the next picture in the sequence. Regardless of whether step 3312 is“Yes” or “No,” process 3300 also proceeds to step 3322.

In step 3314, apparatus 400 determines a control flag for the videoframe at the slice level for slice in the picture as determined in step3308. The control flag for the slice may be an indication of a statusfor a specific slice in the picture. In some embodiments, the controlflag may be an indication of whether a slice of the picture in a videoframe is to be encoded using adaptive loop filter (ALF). The controlflag of the slice may be an example of a third control flag. By way ofexample depicted in FIG. 22A and FIG. 22B, slice_alf_enabled_flag may bea control flag for AFL at the slice level. In some embodiments,slice_alf_enabled_flag may have a value of “1” or “0.” In someembodiments, if value of slice_alf_enabled_flag is not specified ormissing, the default value may be “0.”

In step 3316, apparatus 400 checks for the value of the control flag forALF at the slice level to determine if ALF is enabled at the slicelevel. If ALF is not enabled at the slice level, step 3310 is “No,” andprocess 3300 proceeds to step 3318. In some embodiments, step 3316 is“No” when slice_alf_enabled_flag has a value of “0.” If ALF is enabledat picture level, step 3316 “Yes,” and process 3300 proceeds to step3320. In some embodiments, step 3316 is “Yes” whenslice_alf_enabled_flag has a value of “1.”

In step 3318, apparatus 400 checks if the slice is the last slice in thepicture. If step 3318 is “No,” apparatus 400 proceeds to step 3314 todetermine the control flag for the video frame at the slice for the nextslice in the picture. Regardless of whether step 3318 is “Yes” or “No,”process 3300 also proceeds to step 3322.

In step 3320, apparatus 400 encodes the slice, picture, and/or sequenceof the video frame using adaptive loop filter (ALF). In someembodiments, when AFL is enabled, color components Y, Cb, or Cr isenabled.

In step 3322, apparatus 400 encodes the slice, picture, and/or sequenceof the video frame with adaptive loop filter (ALF) not enabled.

FIG. 34 is a flow chart depicting an exemplary process for determiningcoding a video frame using sample adaptive offset (SAO), consistent withthe present disclosure. Process 3400 may be performed by apparatus 400and its sub-components, such as processor 3102.

In step 3402, apparatus 400 receives video frame or frames.

In step 3404, apparatus 400 determines a control flag for the videoframe at the sequence level. In some embodiments, the control flag maybe an indication of whether the video frame is to be encoded usingsample adaptive offset (SAO). The control flag of the sequence may be anexample of a first control flag. By way of example depicted in FIG. 26 ,sps_sao_enabled_flag may be a control flag for ALF at the sequencelevel. In some embodiments, sps__sao_enabled_flag may have a value of“1” or “0.”

In step 3406, apparatus 400 checks for the value of the control flag forSAO at the sequence level to determine if SAO is enabled at the sequencelevel. If SAO is not enabled at the sequence level, step 3406 is “No,”and process 3400 proceeds to step 3422. When SAO is not enabled at thesequence level, SAO is also not enabled for all pictures and all slicesof the video frame. In some embodiments, step 3406 is “No” whensps_sao_enabled_flag has a value of “0.” If SAO is enabled at sequencelevel, step 3406 is “Yes,” and process 3400 proceeds to step 3408. WhenSAO is enabled at the sequence level, then all pictures in the sequencemay be enabled. In some embodiments, step 3406 is “Yes” whensps_sao_enabled_flag has a value of “1.”

In step 3408, apparatus 400 determines a control flag for the videoframe at the picture level for a picture in the sequence. The controlflag for the picture may be an indication of a status of for all slicesin the picture. In some embodiments, the control flag may be anindication of whether a picture of the video frame is to be encodedusing sample adaptive offset (SAO). The control flag of the picture maybe an example of a second control flag. By way of example depicted inFIG. 26 , one of ph_sao_luma_enabled_flag or ph_sao_chroma_enabled_flag,or both, may be a control flag for SAO at the picture level. In someembodiments, the control flag at the picture level is present in thepicture header. In some embodiments, ph_sao_luma_enabled_flag orph_sao_chroma_enabled_flag may have a value of “1” or “0.” In someembodiments, if value of ph_sao_luma_enabled_flag orph_sao_chroma_enabled flag is not specified or missing, the defaultvalue may be “0.” A person or ordinary skill in the art will nowappreciate that process 3400 depicted in FIG. 34 may be applicable toboth luma component of SAO and chroma component of SAO.

In step 3410, apparatus 400 checks for the value of the control flag forSAO at picture level to determine if SAO is enabled at picture level. IfSAO is not enabled at picture level, step 3410 is “No,” and process 3400proceeds to step 3412. When SAO is not enabled at the picture level, SAOis also not enabled for all slices of that picture of the video frame.In some embodiments, step 3410 is “No” when ph_sao_luma_enabled_flag orph_sao_chroma_enabled_flag has a value of “0.” If SAO is enabled atpicture level, step 3410 “Yes,” and process 3400 proceeds to step 3414.When SAO is enabled at the picture level, then all slices in the picturemay be enabled. In some embodiments, step 3410 is “Yes” whenph_sao_luma_enabled_flag or ph_sao_chroma_enabled_flag has a value of“1.”

In some additional or alternative embodiments, the second control flagmay be a control flag for either the picture level or the slice level,depending on a third control flag signaled at a picture parameter set(PPS).

In step 3412, apparatus 400 checks if the picture is the last picture inthe sequence. If step 3412 is “No,” apparatus 400 proceeds to step 3408to determine the control flag for the video frame at the picture for thenext picture in the sequence. Regardless of whether step 3412 is “Yes”or “No,” process 3400 also proceeds to step 3422.

In step 3414, apparatus 400 determines a control flag for the videoframe at the slice level for slice in the picture as determined in step3408. The control flag for the slice may be an indication of a statusfor a specific slice in the picture. In some embodiments, the controlflag may be an indication of whether a slice of the picture in a videoframe is to be encoded using sample adaptive offset (SAO). The controlflag of the slice may be an example of a third control flag. By way ofexample depicted in FIG. 26 , slice_sao_luma_enabled_flag orslice_sao_chroma_enabled_flag may be a control flag for SAO at the slicelevel. In some embodiments, slice_sao_luma_enabled_flag orslice_sao_chroma_enabled_flag may have a value of “1” or “0.” In someembodiments, if value of slice_sao_luma_enabled flag or slicesao_chroma_enabled_flag is not specified or missing, the default valuemay be “0.”

In step 3416, apparatus 400 checks for the value of the control flag forSAO at the slice level to determine if SAO is enabled at the slicelevel. If SAO is not enabled at slice level, step 3416 is “No,” andprocess 3400 proceeds to step 3418. In some embodiments, step 3416 is“No” when slice sao_luma_enabled_flag or slice sao_chroma_enabled_flaghas a value of “0.” If SAO is enabled at the slice level, step 3416“Yes,” and process 3400 proceeds to step 3420. In some embodiments, step3416 is “Yes” when slice_sao_luma_enabled_flag orslice_sao_chroma_enabled_flag has a value of “1.”

In step 3418, apparatus 400 checks if the slice is the last slice in thepicture. If step 3418 is “No,” apparatus 400 proceeds to step 3414 todetermine the control flag for the video frame at the slice for the nextslice in the picture. Regardless of whether step 3418 is “Yes” or “No,”process 3400 also proceeds to step 3422.

In step 3420, apparatus 400 encodes the slice, picture, and/or sequenceof the video frame using sample adaptive offset (SAO) (either luma orchroma SAO, or both based on the control flags).

In step 3422, apparatus 400 encodes the slice, picture, and/or sequenceof the video frame with using sample adaptive offset (SAO) (either lumaor chroma SAO, or both based on the control flags) not enabled.

FIG. 35 is a flow chart depicting an exemplary process for determiningcoding a video frame while disabling de-blocking filter, consistent withthe present disclosure. Process 3500 may be performed by apparatus 400and its sub-components, such as processor 3102.

In step 3502, apparatus 400 receives video frame or frames.

In step 3504, apparatus 400 determines a control flag for the videoframe at the sequence level. The control flag for the sequence may be anindication of a status of for all pictures in the sequence. In someembodiments, the control flag may be an indication of whether the videoframe is to be encoded with de-blocking filter disabled. The controlflag of the sequence may be an example of a disabled flag for disablingde-blocking filter at sequence level. In some embodiments, the sequencelevel may be a first level. By way of example depicted in FIG. 31A,sps_deblocking_filter_disabled_flag may be a control flag forde-blocking filter at the sequence level. In some embodiments, spsdeblocking_filter disabled flag may have a value of “1” or “0.” In step3504, apparatus 400 further determines an override flag for the videoframe at the sequence level for de-blocking filter. By way of exampledepicted in FIG. 31A, deblocking_filter_override_enabled_flag may be anexample of an override flags at the sequence level. In some embodiments,deblocking_filter_override_enabled_flag may have a value of “1” or “0.”

In step 3506, apparatus 400 checks for the value of the control flag fordisabling de-blocking filter at the sequence level to determine ifde-blocking is disabled at sequence level. If de-blocking is notdisabled at sequence level, step 3506 is “No,” and process 3500 proceedsto step 3512. When de-blocking is disabled at the sequence level,process 3500 proceeds to step 3508. In some embodiments, step 3506 is“No” when sps_deblocking_filter_disabled_flag has a value of “0.” Insome embodiments, step 3406 is “Yes” whensps_deblocking_filter_disabled_flag has a value of “1.”

In step 3508, apparatus 400 checks for value of the override flag fordisabling de-blocking filter at the sequence level. If the override flagis present for the sequence level, step 3508 is “Yes,” and process 3500proceeds to step 3512. In some embodiments, step 3508 is “Yes,” whendeblocking_filter_override_enabled_flag may have a value of “1.” If theoverride flag is not present for the sequence level, step 3508 is “No,”and process 3500 proceeds to step 3510. In some embodiments, step 3508is “No,” when deblocking_filter_override_enabled_flag has a value of“0.”

In step 3510, when de-blocking is disabled for the entire sequence ofvideo frame, and an override flag is not present, de-blocking filter isnot used when the video frame is being encoded for the sequence.

In step 3512, apparatus 400 determines a control flag for the videoframe at picture level for a picture in the sequence. The control flagfor the picture may be an indication of a status of for all slices inthe picture. In some embodiments, the control flag may be an indicationof whether a picture of a video frame in a sequence is to be encodedwith de-blocking filter disabled. In some embodiments, the picture levelmay be a second level. The control flag of the picture may be an exampleof a disabled flag for disabling de-blocking filter at picture level. Byway of example depicted in FIG. 31B, ph_deblocking_filter_disabled_flagmay be a control flag for de-blocking filter at the picture level. Insome embodiments, ph_deblocking_filter_disabled_flag may have a value of“1” or “0.” In step 3512, apparatus 400 further determines an overrideflag for the video frame at the picture level for de-blocking filter. Byway of example depicted in FIG. 31B,ph_deblocking_filter_override_enabled_flag may be an example of anoverride flags at a picture level. In some embodiments,ph_deblocking_filter_override_enabled_flag may have a value of “1” or“0.”

In some additional or alternative embodiments, the first level may theset of pictures level and a first control flag for the first level issignaled at Picture Parameter Set (PPS). In some additional oralternative embodiments, the second level is one of the picture level orslice level, and a second control flag for the second level is signaledat Picture Header (PH) or Slice Header (SH).

In step 3516, apparatus 400 checks for the value of the control flag fordisabling de-blocking filter at the picture level to determine ifde-blocking is disabled at the picture level. If de-blocking is notdisabled at picture level, step 3516 is “No,” and process 3500 proceedsto step 3522. When de-blocking is disabled at the picture level, process3500 proceeds to step 3518. In some embodiments, step 3516 is “No” whenph_deblocking_filter_disabled_flag has a value of “0.” In someembodiments, step 3516 is “Yes” when ph_deblocking_filter_disabled_flaghas a value of “1.”

In step 3518, apparatus 310 checks for value of the override flag fordisabling de-blocking filter at the picture level. If the override flagis present for the picture level, step 3518 is “Yes,” and process 3500proceeds to step 3522. In some embodiments, step 3518 is “Yes,” whenph_deblocking_filter_override_enabled_flag may have a value of “1.” Ifthe override flag is not present for the sequence level, step 3518 is“No,” and process 3500 proceeds to step 3520. In some embodiments, step3518 is “No,” when ph_deblocking_filter_override_enabled_flag has avalue of “0.”

In step 3520, when de-blocking is disabled for a picture of the videoframe in a sequence, and an override flag is not present, de-blockingfilter is not used for that specific picture when the video frame isbeing encoded.

In step 3514, apparatus 400 checks if all pictures of the sequence havebeen processed. If step 3514 is “No,” apparatus 400 proceeds to step3512 for the next picture in the sequence.

In step 3522, apparatus 400 determines a control flag for the videoframe at the slice level for the slice in the picture as determined instep 3516. The control flag for the slice may be an indication of astatus for a specific slice in the picture. In some embodiments, thecontrol flag may be an indication of whether a slice in a picture of thevideo frame is to be encoded with de-blocking filter disabled. Thecontrol flag of the picture may be an example of a disabled flag fordisabling de-blocking filter at slice level. By way of example depictedin FIG. 31B, slice_deblocking_filter_disabled_flag may be a control flagfor de-blocking filter at the slice level. In some embodiments,slice_deblocking_filter_disabled_flag may have a value of “1” or “0.” Instep 3522, apparatus 400 further determines an override flag for thevideo frame at the slice level for de-blocking filter. By way of exampledepicted in FIG. 31B, slice_deblocking_filter_override_enabled_flag maybe an example of an override flags at a slice level. In someembodiments, slice_deblocking_filter_override_enabled_flag may have avalue of “1” or “0.”

In step 3526, apparatus 400 checks for the value of the control flag fordisabling de-blocking filter at slice level to determine if de-blockingis disabled at slice level. If de-blocking is not disabled at slicelevel, step 3526 is “No,” and process 3500 proceeds to step 3532. Whende-blocking is disabled at the slice level, process 3500 proceeds tostep 3528. In some embodiments, step 3526 is “No” when slicedeblocking_filter_disabled_flag has a value of “0.” In some embodiments,step 3526 is “Yes” when slice_deblocking_filter_disabled_flag has avalue of “1.”

In step 3528, apparatus checks for value of the override flag fordisabling de-blocking filter at slice level. If the override flag ispresent for the slice level, step 3528 is “Yes,” and process 3500proceeds to step 3532. In some embodiments, step 3528 is “Yes,” whenslice_deblocking_filter_override_enabled flag has a value of “1.” If theoverride flag is not present for the slice level, step 3528 is “No,” andprocess 3500 proceeds to step 3530. In some embodiments, step 3528 is“No,” when slice_deblocking_filter_override_enabled_flag has a value of“0.”

In step 3530, when de-blocking is disabled for a slice of a picture inthe video frame in a sequence, and an override flag is not present,de-blocking filter is not used for that slice when the video frame isbeing encoded.

In step 3524, apparatus 400 checks if all slices of the picture havebeen processed. If step 3524 is “No,” apparatus 400 proceeds to step3522 again for the next slice in the picture.

In step 3532, apparatus 400 encodes the sequence, pictures, and/slicesof the video frame with de-blocking filter enabled.

In some embodiments, a non-transitory computer-readable storage mediumincluding instructions is also provided, and the instructions may beexecuted by a device (such as the disclosed encoder and decoder), forperforming the above-described methods. Common forms of non-transitorymedia include, for example, a floppy disk, a flexible disk, hard disk,solid state drive, magnetic tape, or any other magnetic data storagemedium, a CD-ROM, any other optical data storage medium, any physicalmedium with patterns of holes, a RAM, a PROM, and EPROM, a FLASH-EPROMor any other flash memory, NVRAM, a cache, a register, any other memorychip or cartridge, and networked versions of the same. The device mayinclude one or more processors (CPUs), an input/output interface, anetwork interface, and/or a memory.

The embodiments can further be described using the following clauses:

-   1. A video encoding method, comprising:    -   receiving a video sequence;    -   encoding the video sequence by using control flags for luma        mapping with chroma scaling (LMCS) at a sequence level, a        picture level, or a slice level, wherein the sequence level, the        picture level, and the slice level are levels ranking from high        to low;    -   signaling a first control flag indicating whether the LMCS is        enabled at a first level; and    -   in response to the first control flag indicating the LMCS is        enabled at the first level, signaling a second control flag        indicating whether LMCS is enabled at a second level, wherein:    -   the LMCS is enabled at the second level when a value of the        second control flag equals to 1;    -   the LMCS is disabled at the second level when the value of the        second control flag equals to 0; and    -   the second level is a lower level than the first level.-   2. The video encoding method of clause 1, wherein the first control    flag is a control flag for the LMCS at the sequence level, and the    second control flag is a control flag for the LMCS at the picture    level.-   3. The video encoding method of clause 2, further comprising:    -   in response to the second control flag indicating the LMCS is        enabled at the second level, signaling a third control flag        indicating whether chroma scaling (CS) is enabled at the second        level, wherein:    -   the CS is enabled at the second level when a value of the third        control flag equals to 1; and    -   the CS is disabled at the second level when the value of the        third control flag equals to 0.-   4. The video encoding method of clauses 1 or 2, further comprising:    -   in response to the second flag indicating the LMCS is enabled at        the second level, signaling a fourth control flag indicating        whether the LMCS is applied at a third level, wherein:        -   luma mapping (LM) is applied and the CS can be applied at            the third level when a        -   value of the fourth control flag equals to 1;        -   the LMCS is not applied at the third level when the value of            the fourth control flag equals to 0; and        -   the third level is a lower level than the second level.-   5. The video encoding method of clause 4, wherein the third level is    the slice level.-   6. The video encoding method of clause 4, wherein when the second    control flag is not signaled, the LMCS is not enabled for the    picture associated with the second control flag.-   7. The video encoding method of clauses 4 or 5, wherein when the    fourth control flag is not signaled, the LMCS is not applied for the    slice associated with the fourth control flag.-   8. The video encoding of method of clause 1, wherein when the first    control flag is signaled, the LMCS at a lower level is not enabled    when the second control flag is not signaled.-   9. The video encoding method of clauses 1 or 8, wherein when the    first control flag is not signaled, the LMCS at a lower level is not    enabled regardless of whether the second control flag is signaled.-   10. A video encoding method, comprising:    -   receiving a video sequence;    -   encoding the video sequence by using control flags for adaptive        loop filter (ALF) at a sequence level, a picture level, or a        slice level, wherein the sequence level, the picture level, and        the slice level are levels ranking from high to low;    -   signaling a first control flag indicating whether the ALF is        enabled at a first level; and    -   in response to the first control flag indicating the ALF at the        first level is enabled, signaling a second control flag        indicating whether ALF is enabled at a second level, wherein:        -   the ALF is enabled at the second level when a value of the            second control flag equals to 1;        -   the ALF is disabled at the second level when the value of            the second control flag equals to 0; and        -   the second level is a lower level than the first level.-   11. The video encoding method of clause 10, further wherein the    first control flag is a control flag for ALF at the sequence level,    and the second control flag is a control flag for ALF at one of the    picture level or the slice level depending on a third control flag    signaled at a Picture Parameter Set (PPS).-   12. The video encoding method of clauses 10 or 11, further    comprising:    -   in response to the second flag indicating the ALF is enabled at        the second level, signaling a fourth control flag indicating        whether Cross Component Adaptive loop filter (CCALF) is enabled        for Cb color component at the second level, wherein:        -   the CCALF is enabled at the second level for Cb color            component when a value of the fourth control flag equals to            1; and        -   the CCALF is disabled at the second level for Cb color            component when the value of the fourth control flag equal to            0; and    -   in response to the second flag indicating the ALF is enabled at        the second level, signaling a fifth control flag indicating        whether Cross Component Adaptive loop filter (CCALF) is enabled        for Cr color component at the second level, wherein:        -   the CCALF is enabled at the second level for Cr color            component when a value of the fifth control flag equals to            1; and        -   CCALF is disabled at the second level for Cr color component            when the value of the fifth control flag equals to 0.-   13. The video encoding method of clause 10, wherein when the first    control flag is signaled, the ALF at the lower level is not enabled    when the second control flag is not signaled.-   14. The video encoding method of clauses 10 or 11, wherein when the    first control flag is not signaled, the ALF at a lower level is not    enabled regardless of whether the second control flag is signaled.-   15. The video encoding method of clauses 10-12, wherein when a    parameter of the ALF is determined in a slice header of a picture,    all slices of the picture will the same the parameter of the ALF.-   16. The video encoding method of clauses 10-12, wherein when the    second control flag is not signaled, ALF is not enabled for the    picture associated with the second control flag.-   17. The video encoding method of clauses 10-12, wherein when the    fourth control flag or the fifth control flag is not signaled, CCALF    is not enabled for the Cb or Cr component of the picture associated    with the second control flag-   18. The video encoding method of clauses 10-12, wherein when the    second control flag is not signaled, ALF is not applied for the    slice associated with the second control flag.-   19. The video encoding method of clauses 10-12, wherein when AFL is    enabled, color components Y, Cb, or Cr is enabled.-   20. A video encoding method, comprising:    -   receiving a video sequence;    -   encoding the video sequence by using control flags for sample        adaptive offset (SAO) at a sequence level, a picture level, or a        slice level, wherein the sequence level, the picture level, and        the slice level are levels ranking from high to low;    -   signaling a first control flag indicating whether the SAO is        enabled at a first level; and    -   in response to the first control flag indicating SAO is enabled        at the first level, signaling a second control flag indicating        whether the SAO is enabled at a second level, wherein:        -   the SAO is enabled for a luma component at the second level            when a value of the second control flag equals to 1;        -   the SAO is disabled for a luma component at a second level            when the value of the second control flag equals to 0; and        -   the second level is a lower level than the first level.-   21. The video encoding method of clause 20, further comprising a    third flag signaled at the second control flag, wherein:    -   the SAO is enabled for a chroma component at the second level        when a value of the third control flag equals to 1; and    -   the SAO is disabled for a chroma component at the second level        when the value of the third control flag equals to 1.-   22. The video encoding method of clauses 20 or 21, wherein the first    control flag is a control flag for SAO at the sequence level, and    the second control flag is a control flag for SAO at one of the    picture level or the slice level depending on a third flag signaled    at a Picture Parameter Set (PPS).-   23.The video encoding method of clauses 20 or 21, wherein when the    second control flag is not signaled, the SAO is disabled for the    luma component of the picture associated with the second control    flag.-   24. The video encoding method of clauses 20 or 21, wherein when the    third control flag is not signaled, the SAO is disabled for the    chroma component of the picture associated with the third control    flag-   25. The video encoding method of clause 20, wherein when the first    control flag is signaled, the SAO at a lower level is disabled when    the second control flag is not signaled.-   26. The video encoding method of clauses 20 or 21, wherein when the    first control flag is not signaled, the SAO at a lower level is    disabled regardless of whether the second control flag is signaled.-   27. The video encoding method of clauses 19-26, wherein when the SAO    is enabled, a SAO process is applied to a reconstructed picture    after a deblocking filter process.-   28. A video encoding method, comprising:    -   receiving a video sequence; and    -   encoding the video sequence by using control flags for        deblocking filter, at a sequence level, a set of pictures level,        a picture level or a slice level, wherein:    -   the deblocking filter is disabled at the first level when a        value of a first control flag at a first level equals to 1 and a        second control flag at a second level is not signaled, and    -   the deblocking filter is enabled at the first level when the        value of the first control flag at the first level equals to 0        and the second control flag at the second level is not signaled;        and    -   the first level is a higher lower than the second level.-   29. The video encoding method of clause 28, wherein the first level    is the set of pictures level and the first control flag is signaled    at Picture Parameter Set (PPS); and the second level is one of the    picture level or the slice level, and the second control flag is    signaled at one of Picture Header (PH) or Slice Header (SH).-   30. The video method of clause 28, further comprising: signaling a    third flag at PPS to indicate whether the second flag is signaled at    the picture level or slice level.-   31. The video encoding method of clause 28, further comprising    encoding the video sequence by using override flags for deblocking    filter, at the sequence level, the set of pictures level, the    picture level or the slice level wherein the override flag is to    indicate whether a lower level control flag can be signaled to    override a higher level control flag.-   32. The video encoding method of clause 28, further comprising    encoding the video sequence by using override flags for deblocking    filter, at the sequence level, the set of pictures level, the    picture level or the slice level, wherein the override flag is to    indicate whether a lower level control flag can be signaled to    override a higher level control flag, and    -   when the higher control flag signaled at the sequence level, the        set of pictures level, the picture level, or the slice level, is        equal to 1, de-blocking filter is not applied to the        corresponding sequence, set of pictures, picture, or slice when        the lower level control flag does not override the higher        control flag.-   33. A video decoding method, comprising:    -   receiving a bit stream containing a video sequence;    -   decoding the video sequence by using control flags for luma        mapping with chroma scaling (LMCS) at a sequence level, a        picture level, or a slice level, wherein the sequence level, the        picture level, and the slice level are levels ranking from high        to low;    -   determining whether a first control flag indicates the LMCS is        enabled at a first level; and    -   in response to a determination that the first control flag        indicates the LMCS is enabled at the first level, determining        whether a second control flag indicates LMCS is enabled at a        second level, wherein:        -   the LMCS is enabled at the second level when a value of the            second control flag equals to 1;        -   the LMCS is disabled at the second level when the value of            the second control flag equals to 0; and        -   the second level is a lower level than the first level.-   34. The video decoding method of clause 33, wherein the first    control flag is a control flag for the LMCS at the sequence level,    and the second control flag is a control flag for the LMCS at the    picture level.-   35. The video decoding method of clause 34, further comprising:    -   in response to a determination that the second control flag        indicates the LMCS is enabled at the second level, determining        whether a third control flag indicates chroma scaling (CS) is        enabled at the second level, wherein:        -   the CS is enabled at the second level when a value of the            third control flag equals to 1; and        -   the CS is disabled at the second level when the value of the            third control flag equals to 0.-   36. The video decoding method of clauses 33 or 34, further    comprising:    -   in response to a determination that the second flag indicates        the LMCS is enabled at the second level, determining whether a        fourth control flag indicates LMCS is applied at a third level,        wherein:        -   luma mapping (LM) is applied and the CS can be applied at            the third level when a value of the fourth control flag            equals to 1;        -   the LMCS is not applied at the third level when the value of            the fourth control flag equals to 0; and        -   the third level is a lower level than the second level.-   37. The video decoding method of clause 36, wherein the third level    is the slice level.-   38. The video decoding method of clause 36, wherein when the second    control flag is not signaled, LMCS is not enabled for the picture    associated with the second control flag.-   39. The video decoding method of clauses 36 or 38, wherein when the    fourth control flag is not signaled, LMCS is not applied for the    slice associated with the fourth control flag.-   40. The video decoding of method of clause 33, wherein when the    first control flag is signaled, the LMCS at a lower level is not    enabled when the second control flag is not signaled.-   41. The video decoding method of clauses 33 or 40, wherein when the    first control flag is not signaled, the LMCS at a lower level is not    enabled regardless of whether the second control flag is signaled.-   42. A video decoding method, comprising:    -   receiving a bit stream containing a video sequence;    -   decoding the video sequence by using control flags for adaptive        loop filter (ALF) at a sequence level, a picture level, or a        slice level, wherein the sequence level, the picture level, and        the slice level are levels ranking from high to low;    -   determining whether a first control flag indicates the ALF is        enabled at a first level; and    -   in response to a determination that the first control flag        indicates the ALF is enabled at the first level, determining        whether a second control flag indicates ALF is enabled at a        second level, wherein:        -   the ALF is enabled at the second level when a value of the            second control flag equals to 1;        -   the ALF is disabled at the second level when the value of            the second control flag equals to 0; and        -   the second level is a lower level than the first level.-   43. The video decoding method of clauses 42, further wherein the    first control flag is a control flag for ALF at sequence level, and    the second control flag is a control flag for ALF at one of the    picture level or the slice level depending on a third control flag    signaled at a Picture Parameter Set (PPS).-   44. The video decoding method of clauses 42 or 43, further    comprising:    -   in response to the determination that the second flag indicates        the ALF is enabled at the second level, determining whether a        fourth control flag indicates Cross Component Adaptive loop        filter (CCALF) is enabled for Cb color component at the second        level, wherein:        -   CCALF is enabled at the second level for Cb color component            when a value of the fourth control flag equals to 1; and        -   the CCALF is disabled at the second level for Cb color            component when the value of the fourth control flag equal to            0; and    -   in response to the determination that the second flag indicates        the ALF is enabled at the second level, signaling a fifth        control flag indicates Cross Component Adaptive loop filter        (CCALF) is enabled for Cr color component at the second level,        wherein:        -   the CCALF is enabled at the second level for Cr color            component when a value of the fifth control flag equals to            1; and        -   CCALF is disabled at the second level for Cr color component            when the value of the fifth control flag equals to 0.-   45. The video decoding method of clause 42, wherein when the first    control flag is present, the ALF at the lower level is not enabled    when the second control flag is not present.-   46. The video decoding method of clauses 42 or 43, wherein when the    first control flag is not present, the ALF at a lower level is not    enabled regardless of whether the second control flag is present.-   47. The video decoding method of clauses 42-44, wherein when a    parameter of the ALF is determined in a slice header of a picture,    all slices of the picture will the same the parameter of the ALF.-   48. The video decoding method of clauses 42-44, wherein when the    second control flag is not present, ALF is not enabled for the    picture associated with the second control flag.-   49. The video encoding method of clauses 42-44, wherein when the    fourth control flag or the fifth control flag is not signaled, CCALF    is not enabled for the Cb or Cr component of the picture associated    with the second control flag-   50. The video decoding method of clauses 42-44, wherein when the    second control flag is not present, ALF is not enabled for the slice    associated with the second control flag.-   51. The video decoding method of clauses 42-44, wherein when AFL is    enabled, color components Y, Cb, or Cr is enabled.-   52. A video decoding method, comprising:    -   receiving a bit stream containing a video sequence;    -   decoding the video sequence by using control flags for sample        adaptive offset (SAO) at a sequence level, a picture level, or a        slice level, wherein the sequence level, the picture level, and        the slice level are levels ranking from high to low;    -   determining whether a first control flag indicates the SAO is        enabled at a first level; and    -   in response to a determination that the first control flag        indicates SAO is enabled at the first level, determining whether        a second control flag indicates the SAO is enabled at a second        level, wherein:        -   the SAO is enabled for a luma component at the second level            when a value of the second control flag equals to 1;        -   the SAO is disabled for a luma component at a second level            when the value of the second control flag equals to 0; and        -   the second level is a lower level than the first level.-   53. The video decoding method of clause 52, further comprise    determining whether a third flag indicates the SAO is enabled at the    second level, wherein:    -   the SAO is enabled for a chroma component at the second level        when a value of the third control flag equals to 1; and    -   the SAO is disabled for a chroma component at the second level        when the value of the third control flag equals to 1.-   54. The video decoding method of clauses 52 or 53, wherein the first    control flag is a control flag for SAO at sequence level, and the    second control flag is a control flag for SAO at one of the picture    level or the slice level depending on a third flag signaled at a    Picture Parameter Set (PPS).-   55.The video encoding method of clauses 52 or 53, wherein when the    second control flag is not present, the SAO is disabled for the luma    component of the picture associated with the second control flag.-   56.The video encoding method of clauses 52 or 53, wherein when the    third control flag is not present, the SAO is disabled for the    chroma component of the picture associated with the third control    flag-   57. The video decoding method of clause 52, wherein when the first    control flag is present, the SAO at a lower level is disabled when    the second control flag is not present.-   58. The video decoding method of clauses 52 or 54, wherein when the    first control flag is not present, the SAO at a lower level is    disabled regardless of whether the second control flag is present.-   59. The video decoding method of clauses 52-58, wherein when the SAO    is enabled, a SAO process is applied to a reconstructed picture    after a deblocking filter process.-   60. A video decoding method, comprising:    -   receiving a bit stream containing a video sequence; and    -   decoding the video sequence by using control flags for        deblocking filter, at a sequence level, a set of pictures level,        a picture level or a slice level, wherein:        -   the deblocking filter is disabled at the first level when            value of a first control flag at a first level equals to 1            and a second control flag at a second level is not present,            and        -   the deblocking filter is enabled at the first level when the            value of the first control flag at the first level equals to            0 and the second control flag at the second level is not            present; and        -   the first level is a higher lower than the second level.-   61. The video decoding method of clause 60, wherein the first level    is the set of pictures level and the first control flag is signaled    at Picture Parameter Set (PPS); and the second level is one of the    picture level or the slice level, and the second control flag is    signaled at one of Picture Header (PH) or Slice Header (SH).-   62. The video method of clause 60, further comprising: determining    whether the second flag is signaled at the picture level or slice    level based on a third flag signaled in PPS.-   63. The video decoding method of clause 60, further comprising    decoding the video sequence by using override flags for deblocking    filter, at the sequence level, the set of pictures level, the    picture level or the slice level wherein the override flag is to    indicate whether a lower level control flag can be present to    override a higher level control flag.-   64. The video decoding method of clause 60, further comprising    decoding the video sequence by using override flags for deblocking    filter, at the sequence level, the set of pictures level, the    picture level or the slice level, wherein the override flag is to    indicate whether a lower level control flag can be present to    override a higher level control flag, and    -   when the higher control flag present at the sequence level, the        set of pictures level, the picture level, or the slice level, is        equal to 1, de-blocking filter is not applied to the        corresponding sequence, set of pictures, picture, or slice when        the lower level control flag does not override the higher        control flag.

It should be noted that, the relational terms herein such as “first” and“second” are used only to differentiate an entity or operation fromanother entity or operation, and do not require or imply any actualrelationship or sequence between these entities or operations. Moreover,the words “comprising,” “having,” “containing,” and “including,” andother similar forms are intended to be equivalent in meaning and be openended in that an item or items following any one of these words is notmeant to be an exhaustive listing of such item or items, or meant to belimited to only the listed item or items.

As used herein, unless specifically stated otherwise, the term “or”encompasses all possible combinations, except where infeasible. Forexample, if it is stated that a database may include A or B, then,unless specifically stated otherwise or infeasible, the database mayinclude A, or B, or A and B. As a second example, if it is stated that adatabase may include A, B, or C, then, unless specifically statedotherwise or infeasible, the database may include A, or B, or C, or Aand B, or A and C, or B and C, or A and B and C.

It is appreciated that the above described embodiments can beimplemented by hardware, or software (program codes), or a combinationof hardware and software. If implemented by software, it may be storedin the above-described computer-readable media. The software, whenexecuted by the processor can perform the disclosed methods. Thecomputing units and other functional units described in the presentdisclosure can be implemented by hardware, or software, or a combinationof hardware and software. One of ordinary skill in the art will alsounderstand that multiple ones of the above described modules/units maybe combined as one module/unit, and each of the above describedmodules/units may be further divided into a plurality ofsub-modules/sub-units.

In the foregoing specification, embodiments have been described withreference to numerous specific details that can vary from implementationto implementation. Certain adaptations and modifications of thedescribed embodiments can be made. Other embodiments can be apparent tothose skilled in the art from consideration of the specification andpractice of the invention disclosed herein. It is intended that thespecification and examples be considered as exemplary only, with a truescope and spirit of the invention being indicated by the followingclaims. It is also intended that the sequence of steps shown in figuresare only for illustrative purposes and are not intended to be limited toany particular sequence of steps. As such, those skilled in the art canappreciate that these steps can be performed in a different order whileimplementing the same method.

In the drawings and specification, there have been disclosed exemplaryembodiments. However, many variations and modifications can be made tothese embodiments. Accordingly, although specific terms are employed,they are used in a generic and descriptive sense only and not forpurposes of limitation.

1. A video encoder, comprising: a memory storing a set of instructions;and at least one processor configured to execute the set of instructionsto: receive a video sequence; encode the video sequence by using controlflags for adaptive loop filter (ALF) at a sequence level, a picturelevel, or a slice level, wherein the sequence level, the picture level,and the slice level are levels ranking from high to low; signal a firstcontrol flag indicating whether the ALF is enabled at a first level; andin response to the first control flag indicating the ALF at the firstlevel is enabled, signal a second control flag indicating whether ALF isenabled at a second level, wherein: the ALF is enabled at the secondlevel when a value of the second control flag equals to 1; the ALF isdisabled at the second level when the value of the second control flagequals to 0; and the second level is a lower level than the first level.2. The video encoder of claim 1, wherein the first control flag is acontrol flag for ALF at the sequence level, and the second control flagis a control flag for ALF at one of the picture level or the slice leveldepending on a third control flag signaled at a Picture Parameter Set(PPS).
 3. The video encoder of claim 1, wherein when the second controlflag is a control flag for ALF at the picture level and the value of thesecond control flag equals to 1, the ALF information is signaled inpicture header, the ALF is enabled for at least one slice associatedwith the picture .
 4. The video encoder of claim 1, wherein when thesecond control flag is a control flag for ALF at the slice level and thevalue of the second control flag equals to 1, the ALF information issignaled in slice header, and the ALF is applied to Y, Cb, or Cr colorcomponent in the slice.
 5. The video encoder of claim 1, wherein the atleast one processor is further configured to: in response to the secondflag indicating the ALF is enabled at the second level, signal a fourthcontrol flag indicating whether Cross Component Adaptive loop filter(CCALF) is enabled for Cb color component at the second level, wherein:the CCALF is enabled at the second level for Cb color component when avalue of the fourth control flag equals to 1; and the CCALF is disabledat the second level for Cb color component when the value of the fourthcontrol flag equal to 0; and in response to the second flag indicatingthe ALF is enabled at the second level, signal a fifth control flagindicating whether CCALF is enabled for Cr color component at the secondlevel, wherein: the CCALF is enabled at the second level for Cr colorcomponent when a value of the fifth control flag equals to 1; and CCALFis disabled at the second level for Cr color component when the value ofthe fifth control flag equals to
 0. 6. The video encoder of claim 1,wherein when a parameter of the ALF is signaled in a picture header of apicture, all slices of the picture share the parameter of the ALF. 7.The video encoder of claim 5, wherein the second level is the picturelevel and when the fourth control flag or the fifth control flag is notsignaled, CCALF is not enabled for the Cb or Cr component of the pictureassociated with the second control flag.
 8. A video decoder, comprising:a memory storing a set of instructions; and at least one processorconfigured to execute the set of instructions to cause the decoder toperform: receive a bitstream; decode the bitstream by using controlflags for adaptive loop filter (ALF) at a sequence level, a picturelevel, or a slice level, wherein the sequence level, the picture level,and the slice level are levels ranking from high to low; decode a firstcontrol flag indicating whether the ALF is enabled at a first level; andin response to the first control flag indicating the ALF at the firstlevel is enabled, decode a second control flag indicating whether ALF isenabled at a second level, wherein: the ALF is enabled at the secondlevel when a value of the second control flag equals to 1; the ALF isdisabled at the second level when the value of the second control flagequals to 0; and the second level is a lower level than the first level.9. The video decoder of claim 8, wherein the first control flag is acontrol flag for ALF at the sequence level, and the second control flagis a control flag for ALF at one of the picture level or the slice leveldepending on a third control flag signaled at a Picture Parameter Set(PPS).
 10. The video decoder of claim 8, wherein when the second controlflag is a control flag for ALF at the picture level and the value of thesecond control flag equals to 1, the ALF information is signaled inpicture header, the ALF is enabled for at least one slice associatedwith the picture .
 11. The video decoder of claim 8, wherein when thesecond control flag is a control flag for ALF at the slice level and thevalue of the second control flag equals to 1, the ALF coefficientinformation is signaled in slice header, and the ALF is applied to Y,Cb, or Cr color component in the slice.
 12. The video decoder of claim8, wherein the at least one processor is configured to execute the setof instructions to cause the decoder to further: in response to thesecond flag indicating the ALF is enabled at the second level, decode afourth control flag indicating whether Cross Component Adaptive loopfilter (CCALF) is enabled for Cb color component at the second level,wherein: the CCALF is enabled at the second level for Cb color componentwhen a value of the fourth control flag equals to 1; and the CCALF isdisabled at the second level for Cb color component when the value ofthe fourth control flag equal to 0; and in response to the second flagindicating the ALF is enabled at the second level, decode a fifthcontrol flag indicating whether CCALF is enabled for Cr color componentat the second level, wherein: the CCALF is enabled at the second levelfor Cr color component when a value of the fifth control flag equals to1; and CCALF is disabled at the second level for Cr color component whenthe value of the fifth control flag equals to
 0. 13. The video decoderof claim 8, wherein when a parameter of the ALF is signaled in a pictureheader of a picture, all slices of the picture share the parameter ofthe ALF.
 14. The video decoder of claim 12, wherein the second level isthe picture level and when the fourth control flag or the fifth controlflag is not signaled, CCALF is not enabled for the Cb or Cr component ofthe picture associated with the second control flag.
 15. Anon-transitory computer readable medium storing a bitstream that isprocessed according to a method comprising: receiving a video sequencecorresponding to the bitstream; encoding the video sequence by usingcontrol flags for adaptive loop filter (ALF) at a sequence level, apicture level, or a slice level, wherein the sequence level, the picturelevel, and the slice level are levels ranking from high to low;signaling a first control flag indicating whether the ALF is enabled ata first level; and in response to the first control flag indicating theALF at the first level is enabled, signaling a second control flagindicating whether ALF is enabled at a second level, wherein: the ALF isenabled at the second level when a value of the second control flagequals to 1; the ALF is disabled at the second level when the value ofthe second control flag equals to 0; and the second level is a lowerlevel than the first level.
 16. The non-transitory computer readablemedium of claim 15, wherein the first control flag is a control flag forALF at the sequence level, and the second control flag is a control flagfor ALF at one of the picture level or the slice level depending on athird control flag signaled at a Picture Parameter Set (PPS).
 17. Thenon-transitory computer readable medium of claim 15, wherein when thesecond control flag is a control flag for ALF at the picture level andthe value of the second control flag equals to 1, the ALF information issignaled in picture header, the ALF is enabled for at least one sliceassociated with the picture .
 18. The non-transitory computer readablemedium of claim 15, wherein when the second control flag is a controlflag for ALF at the slice level and the value of the second control flagequals to 1, the ALF coefficient information is signaled in sliceheader, and the ALF1 is applied to Y, Cb, or Cr color component in theslice.
 19. The non-transitory computer readable medium of claim 15,wherein the method further comprising: in response to the second flagindicating the ALF is enabled at the second level, signaling a fourthcontrol flag indicating whether Cross Component Adaptive loop filter(CCALF) is enabled for Cb color component at the second level, wherein:the CCALF is enabled at the second level for Cb color component when avalue of the fourth control flag equals to 1; and the CCALF is disabledat the second level for Cb color component when the value of the fourthcontrol flag equal to 0; and in response to the second flag indicatingthe ALF is enabled at the second level, signaling a fifth control flagindicating whether CCALF is enabled for Cr color component at the secondlevel, wherein: the CCALF is enabled at the second level for Cr colorcomponent when a value of the fifth control flag equals to 1; and CCALFis disabled at the second level for Cr color component when the value ofthe fifth control flag equals to
 0. 20. The non-transitory computerreadable medium of claim 15, wherein when a parameter of the ALF issignaled in a picture header of a picture, all slices of the pictureshare the parameter of the ALF.
 21. The non-transitory computer readablemedium of claim 19, wherein the second level is the picture level andwhen the fourth control flag or the fifth control flag is not signaled,CCALF is not enabled for the Cb or Cr component of the pictureassociated with the second control flag.